change the color of a square with onmouseover
Add an event parameter (e) to your mouseOver func and use e.target to get the box to set the background on
function getRandomColor() {
let letters = "0123456789ABCDEF";
let color = "#";
for (let i = 0; i < 6; i++) {
color += letters[Math.floor(Math.random() * 16)];
}
return color;
}
function mouseOver(e) {
let newColor = getRandomColor();
return e.target.style.backgroundColor = newColor;
}