Symbol.iterator is a computed key and needs square brackets.
Acceptance criteria
- 1.#out should show 1,2,3.
Symbol.iterator is a computed key and needs square brackets.
const range = { from: 1, to: 3, Symbol.iterator: function* () { for (let i = this.from; i <= this.to; i++) { yield i; } } }; document.querySelector('#out').textContent = "syntax error";
Output ready when you are
Press Run to render your code, or Submit to validate your solution.