Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
junon
on April 22, 2021
|
parent
|
context
|
favorite
| on:
Node.js 16 Available Now
No. `async` on a function automatically defers it even if the return value is immediate.
> async function foo() { return "hello"; } foo().then(console.log); console.log("after")
after hello
Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
> async function foo() { return "hello"; } foo().then(console.log); console.log("after")
after hello