Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript print random word from lsit

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

// Be sure to add more to the string values if you wish to add more words.
 
PREVIOUS NEXT
Tagged: #javascript #print #random #word #lsit
ADD COMMENT
Topic
Name
8+7 =