const iterable1 = {}; iterable1[Symbol.iterator] = function* () { yield 1; yield 2; yield 3; }; console.log([...iterable1]); // Expected output: Array [1, 2, 3]