We have an array like this:
How can WE randomize / shuffle it ?
The de-facto unbiased shuffle algorithm is the Fisher-Yates (aka Knuth) Shuffle.
[community edit: This answer is incorrect; see comments. It is being left here for future reference because the idea is not that rare.]
One could (or should) use it as a protoype from Array:
From ChristopheD:
Use the underscore.js library. The method _.shuffle() is nice for this case. Here is an example with the method:
Adding to @Laurens Holsts answer. This is 50% compressed.