In PHP, when I need to mix an array, I use the shuffle
function.
So:
$a = array('@wallacemaxters', '@rray', '@CiganoMorrisonMendez');
shuffle($a);
print_r($a);
output:
Array
(
[0] => @CiganoMorrisonMendez
[1] => @wallacemaxters
[2] => @rray
)
Similarly, I need to mix an array in JavaScript. But I did not find a Array
method to do that.
How can I mix a Array
in JavaScript?