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

Stats:

CreatedNov 24, 2016
PublishedNov 30, 2016
Warriors Trained1334
Total Skips10
Total Code Submissions3696
Total Times Completed1054
JavaScript Completions1054
Total Stars12
% of votes with a positive feedback rating96% of 420
Total "Very Satisfied" Votes388
Total "Somewhat Satisfied" Votes28
Total "Not Satisfied" Votes4
Total Rank Assessments18
Average Assessed Rank
6 kyu
Highest Assessed Rank
6 kyu
Lowest Assessed Rank
7 kyu
Ad
Contributors
  • y@ro Avatar
  • Voile Avatar
Ad