Tell us what’s happening:
This code has passed all the tests in this lesson, but with this case below it returns a wrong answer! please, help me!
Your code so far
function dropElements(arr, func) {
return arr.slice(arr.findIndex(func) >= 0 ? arr.findIndex(func): arr.length, arr.length);
}
console.log(dropElements([1, 2, 3], function(n) {return n < 3; }));
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36
.
Link to the challenge: