7 kyu

Get array elements with specified keys

Description:

Create a function that lets people easily grab only the array elements with given keys.

For example:

var array = ['a', 'b', 'c', 'd', 'e'];
array2 = array.only([0, 3]);
// at this point array2 should be ['a', 'd']

Note: The order of the elements should be preserved in the resulting array.

Arrays
Fundamentals

Stats:

CreatedJan 2, 2017
PublishedJan 2, 2017
Warriors Trained847
Total Skips14
Total Code Submissions2829
Total Times Completed583
JavaScript Completions583
Total Stars10
% of votes with a positive feedback rating87% of 214
Total "Very Satisfied" Votes168
Total "Somewhat Satisfied" Votes35
Total "Not Satisfied" Votes11
Total Rank Assessments53
Average Assessed Rank
7 kyu
Highest Assessed Rank
5 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • int3_0xcc Avatar
  • Voile Avatar
Ad