The first step is to select the element you want to apply or change a style on. For example, to select a robot’s left eye, you can use the following code:
document.getElementById("lefteye").style.backgroundColor = "purple";
If the CSS property has dashes (‐), the CSS property name gets converted to camelCase. So, background‐color gets changed to backgroundColor.