Get a random item from a JavaScript array

var item = items[Math.floor(Math.random()*items.length)];

Leave a Comment