0

why got it this result in array.filter? javascript

JAVASCRIPT var c = new Array(1, 2, 3, 4, 5, 6); var b = c.filter(function(a) { return (a % 2) - 1; }); //output [2,4,6] i dont understand it

16th Mar 2020, 5:40 PM
MetaCop
MetaCop - avatar
3 odpowiedzi
+ 2
xaralampis_ Why you are going on profile pic?
16th Mar 2020, 5:53 PM
A͢J
A͢J - avatar
0
Pip?
17th Mar 2020, 5:10 AM
MetaCop
MetaCop - avatar