The variable only exists inside the function.
Acceptance criteria
- 1.#out should show 42.
The variable only exists inside the function.
function calculate() { const result = 42; } calculate(); document.querySelector('#out').textContent = typeof result === "undefined" ? "undefined" : result;
Output ready when you are
Press Run to render your code, or Submit to validate your solution.