Get a random item from a JavaScript array [duplicate] by Tarik var item = items[Math.floor(Math.random()*items.length)];