Freecodecamp: [beta] Consider adding additional test case for "Basic Algorithm Scripting: Finders Keepers"

Created on 6 Feb 2017  路  1Comment  路  Source: freeCodeCamp/freeCodeCamp

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?

Most helpful comment

I'm on it..

>All comments

I'm on it..

Was this page helpful?
0 / 5 - 0 ratings