📅  最后修改于: 2022-03-11 15:01:19.238000             🧑  作者: Mango
const iterable1 = {};
iterable1[Symbol.iterator] = function* () {
yield 1;
yield 2;
yield 3;
};
console.log([...iterable1]);
// expected output: Array [1, 2, 3]