复制1const promise = new Promise((resolve, reject) => { 2 resolve("success1"); 3 reject("error"); 4 resolve("success2"); 5}); 6promise 7.then(res => { 8 console.log("then: ", res); 9 }).catch(err => { 10 console.log("catch: ", err); 11 }) 12
1const promise = new Promise((resolve, reject) => { 2 resolve("success1"); 3 reject("error"); 4 resolve("success2"); 5}); 6promise 7.then(res => { 8 console.log("then: ", res); 9 }).catch(err => { 10 console.log("catch: ", err); 11 }) 12
题库维护不易,您的支持就是我们最大的动力!