Generator 函数和for...of循环,实现斐波那契数列
function* fib () { let [prev, cur] = [0,1] for (;;) { yield cur [prev, cur] = [cur, cur+prev] }}for (let item of fib()) { if (item > 1000) break; co...