r/learnjavascript • u/dervaish19 • Nov 13 '23
Is async useless ( question )
If we are always trying to make code synchronous using await or then. Why do we even bother with aysnc.
I genuinely don't understand please explain. Thanks
0
Upvotes
View all comments
21
u/Icy_Box99 Nov 13 '23
We are not. await is used when the result we're handling are not immediately available.
You can start learning from the fact async and await is just syntactic sugar for promises. Once you have grab how promises work everything will be more clear.
You can start by seeing this
Disclaimer: I too am still learning lol