A dashed CSS name is not valid in JavaScript.
Acceptance criteria
- 1.#out should show yellow.
A dashed CSS name is not valid in JavaScript.
const p = document.getElementById("demo"); p.style["background-colour"] = "yellow"; document.querySelector('#out').textContent = p.style.backgroundColor === "" ? "nothing was set" : p.style.backgroundColor;
Output ready when you are
Press Run to render your code, or Submit to validate your solution.