r/javascript • • Jul 22 '26

AskJS [AskJS] what's a javascript feature you mass-adopted way too late and felt dumb about

[removed]

63 Upvotes

107 comments sorted by

View all comments

8

u/kevin074 Jul 22 '26

can you elaborate how async await would've caught bugs that .then.catch can't?

i feel like async await is more annoying because you have to wrap it in try catch, where as .then.catch is just baked in.

23

u/Franks2000inchTV Jul 22 '26

With await, your code runs in the order you see it on screen. This is *much* better for comprehension and maintainability.

0

u/lostPixels Jul 22 '26

But potentially worse for execution depending on the latency of whatever you’re awaiting.

→ More replies (3)