Skip to content

compute shuffle

kgryte edited this page May 12, 2015 · 1 revision

Generates a random permutation of (shuffles) an array in place.

var arr = [ 1, 2, 3, 4 ];

compute.shuffle( arr );

Note: the array is mutated.

Clone this wiki locally