Here you can find the source of getRandom(items)
function getRandom(items) { var item = items[Math.floor(Math.random() * items.length)]; return item; }//from w w w .j a va 2 s.c o m
var getRandomItem = function(items){ return items[Math.floor(Math.random()*items.length)];