Challenge finders-keepers has an issue.
function findElement(arr, func) {
return arr.find(func);
}
findElement([1, 2, 3, 4], function(num){ return num % 2 === 0; });
Thanks to ES6, this algorithm is completely solved by the built in Array.prototype.find() method.
Maybe we should add a test case that ensures campers don't use this, but rather write their own code?
I'm on it..
Most helpful comment
I'm on it..