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);
})();
No any search results
You already invited:
1 Answers
Sharun - be myself
Upvotes from:
At least I'm pretty sure... I don't usually use reject