Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Pick Random Value From Array

 javascriptCopyvar myArray = ['one', 'two', 'three', 'four', 'five'];
var rand = Math.floor(Math.random()*myArray.length);
var rValue = myArray[rand];
console.log(rValue)
Source by www.delftstack.com #
 
PREVIOUS NEXT
Tagged: #Pick #Random #Value #From #Array
ADD COMMENT
Topic
Name
3+8 =