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
Similar Kata:
Stats:
Created | Mar 7, 2016 |
Published | Mar 7, 2016 |
Warriors Trained | 15990 |
Total Skips | 437 |
Total Code Submissions | 35054 |
Total Times Completed | 7169 |
JavaScript Completions | 7165 |
Total Stars | 143 |
% of votes with a positive feedback rating | 72% of 919 |
Total "Very Satisfied" Votes | 566 |
Total "Somewhat Satisfied" Votes | 198 |
Total "Not Satisfied" Votes | 155 |