Answers for "generate random words in js"

1

js random word generator

var word = ['Rock', 'Paper', 'Scissor'];
var words = word[Math.floor(Math.random()*word.length)];
alert('The computer chose:' + word);

// Be sure to add more to the string values if you wish to add more words.
Posted by: Guest on March-12-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language