I have a question about this Promise code. Why "Foo" is logged? I am confused since 'then' is following 'catch', and 'catch' is never called, why execution flows into 'then'?
let myPromise = new Promise((resolve, reject) => {
resolve("Foo");
});
myPromise.catch((value) => {
console.log('inside catch');
}).then((value) => {
console.log(value);
});