Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
THBC
12 months ago
|
parent
|
context
|
favorite
| on:
I avoid async/await in JavaScript (2022)
That’s not ”raw Promise” syntax, that’s Thenable syntax.
Compare with
const myPromise = new Promise((resolve, reject) => resolve(”foo”));
Afterwards either try-catch await myPromise, or use myPromise.then().catch()
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
Compare with
Afterwards either try-catch await myPromise, or use myPromise.then().catch()