function randcol() {
var ac =["red","orange","yellow","green","blue","purple","brown","pink","magenta","cyan","olive","maroon","navy","aquamarine","turquoise","silver","lime","teal","indigo","violet"]
return ac[Math.floor(Math.random() * ac.length)]
}
//test call
console.log( randcol())
No comments:
Post a Comment