An object needs turning into text, not the other way round.
Acceptance criteria
- 1.#out should show the object as JSON text.
An object needs turning into text, not the other way round.
const person = { name: "Ada" }; let text; try { text = JSON.parse(person); } catch (error) { text = "cannot parse an object"; } document.querySelector('#out').textContent = text;
Output ready when you are
Press Run to render your code, or Submit to validate your solution.