8 kyu

Implement Array.prototype.filter()

7,165 of 7,169hjyao

Description:

What we want to implement is Array.prototype.filter() function, just like the existing Array.prototype.filter(). Another similar function is _.filter() in underscore.js and lodash.js.

The usage will be quite simple, like:

[1, 2, 3, 4, 5].filter(num => num > 3) == [4, 5]

Of course, the existing Array.prototype.filter() function has been undefined for the purposes of this Kata.


More info can be found here:

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter

Arrays
Fundamentals

Stats:

CreatedMar 7, 2016
PublishedMar 7, 2016
Warriors Trained15990
Total Skips437
Total Code Submissions35054
Total Times Completed7169
JavaScript Completions7165
Total Stars143
% of votes with a positive feedback rating72% of 919
Total "Very Satisfied" Votes566
Total "Somewhat Satisfied" Votes198
Total "Not Satisfied" Votes155
Ad
Contributors
  • hjyao Avatar
  • joh_pot Avatar
  • booniepepper Avatar
Ad