Finders Keepers
function findElement(arr, func) {
for (let a of arr){
if(func(a)) return a
}
}
findElement([1, 2, 3, 4], num => num % 2 === 0);
function findElement(arr, func) {
for (let a of arr){
if(func(a)) return a
}
}
findElement([1, 2, 3, 4], num => num % 2 === 0);