Shuffling an Array in JS |


by kirupa | 19 June 2012

Let's say you have an array whose data is the numbers 1 through 8 stored sequentially as visualized below:

This is a companion discussion topic for the original entry at


Thanks a lot for this explanation, it really helped me!!
Keep up the good work!


Glad you liked it :slight_smile: