会员
周边
捐助
新闻
博问
闪存
赞助商
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
Cedric's Blog
博客园
首页
新随笔
联系
订阅
管理
2019年2月21日
JavaScript 利用 async await 实现 sleep 效果
摘要: ``` const sleep = (timeountMS) => new Promise((resolve) => { setTimeout(resolve, timeountMS); }); (async () => { console.log('11111111, ' + new Date()); await sleep(2000); console.log('222222...
阅读全文
posted @ 2019-02-21 10:23 Mr.曹
阅读(5144)
评论(1)
推荐(1)
编辑
公告