Guest practice: this set is not saved and does not count.
What does this log?
const found = []; for (const n of [4, 8, 15, 16]) { if (n > 10) break; found.push(n); } console.log(found);
for (const i = 0; i < 3; i++) { } throws a TypeError.
for (const i = 0; i < 3; i++) { }
const s = "hi\u{1F600}"; console.log(s.length, [...s].length);
const range = { from: 1, to: 3, [Symbol.iterator]() { let current = this.from; const last = this.to; return { next() { if (current <= last) { return { value: current++, done: false }; } return { value: undefined, done: true }; } }; } }; console.log([...range], [...range].length);
TypeError
function* abc() { yield "a"; yield "b"; return "c"; } const g = abc(); g.next(); g.next(); console.log(g.next(), g.next());
Click a question to go back and check it. After you submit, you will see the right answer and an explanation for every question. As a guest, nothing is saved.
Check my answers