Javascript Array Sort & Random Ordering
Recently a colleague and I were looking at some Javascript code that randomizes a list of elements. The code did this by creating an array of list-item elements, and then passing a comparison function that returns a random result to the array.sort() method. Unfortunately, the random order was anything but random: after reloading the page … Continue reading Javascript Array Sort & Random Ordering
Copy and paste this URL into your WordPress site to embed
Copy and paste this code into your site to embed