Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js random generator

var options = ["Your options", "Another option!", "This is an option."];
var chosenOption = Math.floor(Math.random() * options.length);
console.log(options[option]);
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #js #random #generator
ADD COMMENT
Topic
Name
5+7 =