The loop variable holds the property name, not the value.
Acceptance criteria
- 1.#out should show name-age-city.
The loop variable holds the property name, not the value.
const person = { name: "John", age: 30, city: "London" }; const keys = []; for (const key in person) { keys.push(person[key]); } document.querySelector('#out').textContent = keys.join("-");
Output ready when you are
Press Run to render your code, or Submit to validate your solution.