1const promise = new Promise((resolve, reject) => { 2 reject("error"); 3 resolve("success2"); 4}); 5promise 6.then(res => { 7 console.log("then1: ", res); 8 }).then(res => { 9 console.log("then2: ", res); 10 }).catch(err => { 11 console.log("catch: ", err); 12 }).then(res => { 13 console.log("then3: ", res); 14 })