Without a break the next case runs and overwrites the answer.
Acceptance criteria
- 1.#out should show one.
Without a break the next case runs and overwrites the answer.
const n = 1; switch (n) { case 1: document.querySelector('#out').textContent = "one"; case 2: document.querySelector('#out').textContent = "two"; break; }
Output ready when you are
Press Run to render your code, or Submit to validate your solution.