Promise.resolve("init_arg").then(a1=>{
console.log('run 1 with:',a1);
return Promise.resolve("hi,2!");
}).then(a21 => {
console.log('run 2 with:',a21);
console.log(a21);
})
Promise.resolve("init_arg").then(a1=>{
console.log('run 1 with:',a1);
return Promise.resolve("hi,2!");
}).then(a21 => {
console.log('run 2 with:',a21);
console.log(a21);
})
本文标题:promise chain 传参
本文链接:https://www.haomeiwen.com/subject/logyaxtx.html
网友评论