I am relatively new to javascript and want to find out how the things here work.
I don't understand why does it output
testing.js:2 Uncaught (in promise) Oops
instead of catching this error and handling it.
Everything works fine if I just type reject(..)
Here is the code:
let alex = new Promise((resolve,reject)=>{
return Promise.reject('Oops');
})
.then((r)=>console.log(r))
.catch((err)=>console.log(err));