About promises and await/async : All examples I find online show that we need to create a "promise maker function" and then call it with await

About promises and await/async : All examples I find online show that we need to create a "promise maker function" and then call it with await
 
promise13 = () => {
return new Promise((resolve, reject) => { reject(13)})
}

(async () => {
let num = await promise13();
console.log('num', num);
})();
what is inherently wrong with this?:
(async () => {
let num = await new Promise((resolve, reject) => { reject(13)});
console.log('num', num);
})();
You already invited:

Sharun - be myself

Upvotes from:

You don't need the new Promise function. you can just have let num = await Promise.reject(13)
At least I'm pretty sure... I don't usually use reject

If you wanna answer this question please Login or Register