Change circle background
Press a key (r, g, b, y, p or o) to change the color of this circle.
lightgray
const o=document.getElementById("circle"),e=[{code:"KeyR",color:"indianred"},{code:"KeyG",color:"palegreen"},{code:"KeyB",color:"lightblue"},{code:"KeyY",color:"lightyellow"},{code:"KeyP",color:"mediumpurple"},{code:"KeyO",color:"orange"}];window.addEventListener("keydown",c=>{const l=c.code;console.log("keyHitCode",l);const d=e.find(o=>o.code===l);d&&(o.style.backgroundColor=d.color,o.innerText=d.color)});
//# sourceMappingURL=circleBackground.js.map