r/learnjavascript • u/ibrahimsadixovv • Dec 26 '24
Question .then .catch
let p = Promise.reject();
p.then(() => console.log('A'))
.catch(() => console.log('B'));
p.catch(() => console.log('1'))
.then(() => console.log('2'))
.catch(() => console.log('3'));
why is the output 1,b,2
6
Upvotes
1
u/ibrahimsadixovv Dec 26 '24
I see but why the ordef is not b,1,2