how to make javascript progarm that randomly displayes a word
snippet in javascript

how to make javascript progarm that randomly displayes a word

user299

//get random value from array
var colors = ["red","blue","green","yellow"];
var randColor = colors[Math.floor(Math.random() * colors.length)];