What is the output?
Anonymous Quiz
23%
undefined 10 2
18%
10 10 1
32%
undefined undefined 2
27%
10 10 2
🤔2❤1
CHALLENGE
const counter = {
count: 0,
*[Symbol.iterator]() {
yield this.count++;
yield this.count++;
yield this.count++;
}
};
console.log([...counter], counter.count);
export {};What is the output?
Anonymous Quiz
21%
[ 0, 1, 2 ] 2
38%
[ 0, 1, 2 ] 0
29%
[ 0, 1, 2 ] 3
13%
[ 1, 2, 3 ] 3
❤1