function dropElements(arr, func) {
// Drop them elements.
while (!func(arr.slice(0,1))){
arr.shift();
}
return arr
}
dropElements([0, 1, 0, 1], function(n) {return n === 1;}) should return [1, 0, 1].
This never evaluates to true and I can’t figure out why. All other cases pass. I have researched strict equality but can;t see why this doesn’t work.