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 medium.com #
 
PREVIOUS NEXT
Tagged: #js #random #generator
ADD COMMENT
Topic
Name
5+9 =