freecodecamp drop it

Solutions on MaxInterview for freecodecamp drop it by the best coders in the world

showing results for - "freecodecamp drop it"
Lorenzo
14 Sep 2019
1const dropElements = (arr, func) => {
2  const indexes = arr.findIndex(func);
3  return indexes >= 0 ? arr.slice(indexes) : []
4}
5
6dropElements([1, 2, 3], function(n) {return n < 3; });
queries leading to this page
drop itfreecodecamp drop it