Skip to content

Instantly share code, notes, and snippets.

View superlinkx's full-sized avatar

Alyx Holms superlinkx

View GitHub Profile
@superlinkx
superlinkx / wow.js
Last active August 29, 2015 13:57 — forked from anonymous/wow.js
/*
* Add a shuffle function to Array object prototype
* Usage :
* var tmpArray = ["a", "b", "c", "d", "e"];
* tmpArray.shuffle();
*/
Array.prototype.shuffle = function (){
var i = this.length, j, temp;
if ( i == 0 ) return;
while ( --i ) {