Wybierz losowy element z tablicy - CSS-Tricks

Anonim
var myArray = ( "Apples", "Bananas", "Pears" ); var randomItem = myArray(Math.floor(Math.random()*myArray.length));

Zobacz Pen gLJPZv autorstwa Chrisa Coyiera (@chriscoyier) na CodePen.