With no check the text is coerced and a wrong answer is returned.
Acceptance criteria
- 1.#out should show must be numbers.
With no check the text is coerced and a wrong answer is returned.
function area(width, height) { return width * height; } let message; try { message = String(area("4", 5)); } catch (error) { message = error.message; } document.querySelector('#out').textContent = message;
Output ready when you are
Press Run to render your code, or Submit to validate your solution.