如何把一个数组 Array 转化为迭代器 Iterable
Issue 欢迎在 Gtihub Issue 中回答此问题: Issue 666 (opens in a new tab)
Author 回答者: shfshanyue (opens in a new tab)
const list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
const it = list[Symbol.iterator]();
it.next();
Issue 欢迎在 Gtihub Issue 中回答此问题: Issue 666 (opens in a new tab)
Author 回答者: shfshanyue (opens in a new tab)
const list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
const it = list[Symbol.iterator]();
it.next();