shab
April 26, 2019, 10:15am
1
Just wanted to submit this solution for this algorithm.
Your code so far
function findElement(arr, func) {
return arr.find(func)
}
console.log(findElement([1, 2, 3, 4], num => num % 2 === 0));
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.108 Safari/537.36
.
So to contribute solutions see https://github.com/freeCodeCamp/freeCodeCamp/blob/master/CONTRIBUTING.md
However, the challenge is asking you to implement find
. Implementing find
by just using find
does not really seem to be in the spirit of the challenge at all
shab
April 26, 2019, 1:23pm
3
Ah okay I see. The other algorithm tell you to not use a particular method but this one didn’t.