Skip to content

Instantly share code, notes, and snippets.

@aweary
Created February 17, 2015 17:20
Show Gist options
  • Save aweary/9c8052d390924bdeb2ee to your computer and use it in GitHub Desktop.
Save aweary/9c8052d390924bdeb2ee to your computer and use it in GitHub Desktop.
Random character formation from an input string
var scrambleWord = function(word){
var result = "";
var i = word.length;
while(i--){
result += word.charAt(Math.floor(Math.random() * word.length));
}
return result
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment