5
In PHP, when I need to mix an array, I use the function shuffle
.
Thus:
$a = array('@wallacemaxters', '@rray', '@CiganoMorrisonMendez');
shuffle($a);
print_r($a);
exit:
Array
(
[0] => @CiganoMorrisonMendez
[1] => @wallacemaxters
[2] => @rray
)
Likewise, I need to mix an array in Javascript. However, I couldn’t find a method for Array
to do this.
How can I mix one Array
javascript?
Isn’t there a native function for this in js? o.o
– rray
No, that’s why I asked
– Wallace Maxters