会员
周边
众包
新闻
博问
闪存
赞助商
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
时间观测者
博客园
首页
新随笔
联系
订阅
管理
2021年11月25日
JavaScript中对于 promise和async和await的理解
摘要: 对于一段基于promise的异步操作,我们可以这样使用 function fn1 (ms){ return new Promise( (reslove) => { setTimeout(()=>{ console.log('--定时器内--',ms) reslove(ms) },ms) } ) }
阅读全文
posted @ 2021-11-25 17:21 时间观测者
阅读(104)
评论(0)
推荐(0)
编辑
公告