您当前的位置: 首页 > 

暂无认证

  • 0浏览

    0关注

    92582博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

promise的使用

发布时间:2021-07-14 14:28:29 ,浏览量:0

function func1() { return new Promise((resolve) => { setTimeout(() => { resolve("func1 1000"); }, 1000); }); }; function func2() { return new Promise((resolve) => { setTimeout(() => { resolve("func1 2000"); }, 2000); }); }; function func3() { return new Promise((resolve) => { setTimeout(() => { resolve("func1 3000"); }, 3000); }); }; func1() .then((result) => { console.log(result); return func3(); }) .then((result) => { console.log(result); return func2(); }) .then((result) => { console.log(result); }); 
关注
打赏
1653961664
查看更多评论
立即登录/注册

微信扫码登录

0.4024s