= [12, 5, 8, 130,44].filter(isBigEnough)
Is there a way to change the number 10 in isBigEnough function when I call it in filter prototype?
Yes, curry it
const isBiggerThan = max => value => value >= max; const filtered = [ 12, 5, 8, 130, 44 ] .filter(isBiggerThan(10));
Thanks but I am using classes
No you're not
There is no class-based code here
Sent code is from mdn My code is with class
Why don't you show YOUR code then?
Обсуждают сегодня