Answers for "random color generator javascript specifc range"

-1

generate random color array javascript

var colors = ['red', 'green', 'blue', 'orange', 'yellow'];

myDiv.style.backgroundColor = colors[Math.floor(Math.random() * colors.length)];
Posted by: Guest on April-28-2021

Code answers related to "random color generator javascript specifc range"

Code answers related to "Javascript"

Browse Popular Code Answers by Language