Dug this one out of an old Flash project. Could easily be ported to JS
Here’s another simple utility that came out of something old. It simply returns an array of consecutive integers, only in a random order, with no repetition. By default the smallest value is zero and the highest is the length of array requested – 1. However you can set the base value via an optional second argument.
A typical usage would be to trigger a number of animations in a random order.
Again, simple stuff but if it saves you 10 minutes then this post was worthwhile.