Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript random word

// function for selecting a random index from an array
const pickOne = (arr) => arr[Math.floor(Math.random() * arr.length)];

let choice = pickOne(["Apple", "Banana", "Orange"]);
 
PREVIOUS NEXT
Tagged: #javascript #random #word
ADD COMMENT
Topic
Name
9+7 =