choose random value of an array code example
Example: how to get random item from an array
//Function to make it easier
Array.prototype.random = function() {
return this[Math.floor((Math.random() * this.length))];
};
var colors = ["red","blue","green","yellow"];
var randomColor = colors.random();