+1

JavaScript - Why is output [2,4]?

var c = new Array(1,2,3,4); var b = c.filter(function(a){ return(a%2-1); }); document.write(b);

10/14/2019 12:17:16 PM

Paolo De Nictolis

2 Answers

New Answer

+3

https://code.sololearn.com/WK4o6Coysk6V/#js

+2

WONDERFUL answer!