No such function exist, you'll write one yourself. Here's an example:
function shuffle(string) {
var parts = string.split('');
for (var i = parts.length; i > 0;) {
var random = parseInt(Math.random() * i);
var temp = parts[--i];
parts[i] = parts[random];
parts[random] = temp;
}
return parts.join('');
}
alert(shuffle('abcdef'));
You could use php.js implementation: http://phpjs.org/functions/str_shuffle:529
You could also do it as a prototype:
Using it like so:
Here's my versinof the php.js function
No such function exist, you'll write one yourself. Here's an example:
No, there is no inbuilt method of String that will randomise the character sequence.
I would recommend lodash shuffle function.