[Solved] Better way to write this javascript filter code? [closed]
Depends on why you’re doing what you’re doing with this code. If you’re just trying to golf it, one way to make it shorter is to remove the definitions of the lambdas and call them inline. Something like below var numbers = [0,1,2,3,4,5,6,7,8,9]; var greaterthanvalues = ((numbers, value) => numbers.filter((number) => number > value ))(numbers, … Read more