摘要: function* nTimes(n) { if (n > 0){ yield* nTimes(n-1); yield n-1; } } for(const x of nTimes(4)){ console.log(x); } 输出:0 1 2 阅读全文
posted @ 2022-09-04 15:14 学习让我充实 阅读(14) 评论(0) 推荐(0)