Answer:
Step-by-step explanation:
html
head
script
var colors = ["red", "green", "blue", "#ff00ff", "orange", "yellow"];
function changeColor() {
var getRandomColor = colors[Math.floor(Math.random() * colors.length)];
document.getElementById("circle").style.background = getRandomColor;
};
setInterval(changeColor, 1000); //every one second
document.getElementById("rectangle").style.backgroundColor = "brown";
/script
/head
body
<div id="rectangle" id="circle">"></div>
<div id="circle"></div>
/body
/html