摘要:
function timeout(delay=1000){ return new Promise((resolve,reject)=>{ setTimeout(resolve,delay); }) } timeout().then(()=>{ console.log(1); return timeo 阅读全文
摘要:
let p1 = new Promise((resolve,reject)=>{ //resolve('resolve') reject('reject') }); p1.then(a=>{ console.log(a); },b=>{ console.log(b); return 1; }).th 阅读全文