Combos Array

Run Settings
LanguageJavaScript
Language Version
Run Command
( function(){ var singles = [ "a", "b", "c", "d", "e" ]; var combos = []; // YOUR CODE HERE for(i=0;i<singles.length;i++) { for (j=0; j<singles.length; j++) combos.push(singles[i] + singles[j]) } console.log(combos) console.assert( combos.length == 25, { "message" : "`combos.length` does not equal 25", "combos.length" : combos.length } ); console.assert( utility.areArraysEqual( combos, utility.combos ), { "message" : "`combos` does not contain all combinations of letters", "combos" : combos } ); } )();
Editor Settings
Theme
Key bindings
Full width
Lines