Thank you so much, in advance!
-Kristopher
This is my code:
function dropElements(arr, func) {
// Drop them elements.
var works = [];
var n = arr.filter(func);
if (n){works.push(n)}
var indx = arr.indexOf(works[0][0]);
arr.slice(indx);
return works;
}
dropElements([1, 2, 3], function(n) {return n < 4;});
```js
function dropElements(arr, func) {
// Drop them elements.
var works = [];
var n = arr.filter(func);
if (n){works.push(n)}
var indx = arr.indexOf(works[0][0]);
arr.slice(indx);
return works;
}
dropElements([1, 2, 3], function(n) {return n < 4;});
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36
.
Link to the challenge: