Shuffle String

Run Settings
LanguageJavaScript
Language Version
Run Command
//String and indices are given. Shuffle the string based on the given string const shuffle = function(string1,indices){ let shuffledString="" for(let i=0;i<string1.length;i++){ shuffledString += string1[indices[i]] //console.log(shuffledString) } return shuffledString; } console.log(shuffle("TEST",[1,3,0,2]))
Editor Settings
Theme
Key bindings
Full width
Lines