Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js get random element in array

var item = items[Math.floor(Math.random()*items.length)];
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #random #element #array
ADD COMMENT
Topic
Name
7+3 =