1const promise1 = new Promise((resolve, reject) => { 2 setTimeout(() => { 3 resolve('success') 4 }, 1000) 5}) 6const promise2 = promise1.then(() => { 7 throw new Error('error!!!') 8}) 9console.log('promise1', promise1) 10console.log('promise2', promise2) 11setTimeout(() => { 12 console.log('promise1', promise1) 13 console.log('promise2', promise2) 14}, 2000)