// 红黄绿: 使用异步编程方案, promise, async await // 循环打印: 一轮打印完了以后递归重复这一过程 const taskRunner = (light, timeout) => { return new Promise((resolve) => { setTimeout(() => resolve(console.log(light)), timeout)
专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]
Copyright (C)ICode9.com, All Rights Reserved.
ICode9版权所有