I’m on a problem is known as Drop it.
According to the test cases,
dropElements([0, 1, 0, 1], function(n) {return n === 1;})
should return [1, 0, 1]
dropElements([1, 2, 3, 9, 2], function(n) {return n > 2;})
should return [3, 9, 2]
Why it’s not [1,1]
and [3,9]
instead of [1,0,1]
and [3,9,2]
?