Javascript Array rand()
rand()
Array.prototype.rand = function() { return this[Math.floor(Math.random() * this.length)]; };