function sleep(ms){ var temple=new Promise( (resolve)=>{ console.log(111);setTimeout(resolve,ms) }); return temple } sleep(5000).then(function(){ console.log(222) })
本文共 248 字,大约阅读时间需要 1 分钟。
function sleep(ms){ var temple=new Promise( (resolve)=>{ console.log(111);setTimeout(resolve,ms) }); return temple } sleep(5000).then(function(){ console.log(222) })
转载于:https://www.cnblogs.com/s1956/p/8960946.html