Javascript Array random_item()
item()
'use strict';/*w w w . j a v a 2 s . c o m*/ Array.prototype.random_item = function () { return this[Math.floor(Math.random() * this.length)]; };