6 kyu
TV channels
1,054y@ro
Description:
Program channels into your TV's memory. An array with channels (strings) will be passed as an argument to the function redarr(). Sort the channels in an alphabetical order, remove duplicates and, finally, return an object where each channel (object's value) is assigned to a whole number (objects's key), starting with 0.
Examples:
var arr = ["BBC1", "BBC2", "MTV"];
redarr(arr) // returns {"0":"BBC1", "1":"BBC2", "2":"MTV"}
var arr = ["BBC1", "BBC1", "BBC2", "MTV"];
redarr(arr) // returns {"0":"BBC1", "1":"BBC2", "2":"MTV"}
Arrays
Fundamentals
Similar Kata:
Stats:
Created | Nov 24, 2016 |
Published | Nov 30, 2016 |
Warriors Trained | 1334 |
Total Skips | 10 |
Total Code Submissions | 3696 |
Total Times Completed | 1054 |
JavaScript Completions | 1054 |
Total Stars | 12 |
% of votes with a positive feedback rating | 96% of 420 |
Total "Very Satisfied" Votes | 388 |
Total "Somewhat Satisfied" Votes | 28 |
Total "Not Satisfied" Votes | 4 |
Total Rank Assessments | 18 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 7 kyu |