Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
dvlsg
on May 17, 2016
|
parent
|
context
|
favorite
| on:
JavaScript async/await implemented in V8
You probably can, but you may as well just do this instead:
const json = await fetch('https://api.github.com/orgs/facebook').then(res => res.json());
ludamad
on May 17, 2016
[–]
I think the await code is more explicit, whereas a callback is somewhat ambiguous
nathancahill
on May 17, 2016
|
parent
[–]
I'll be glad to do away with callbacks completely tbh.
Consider applying for YC's Summer 2025 batch! Applications are open till May 13
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: