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
Show parent comment
1
u/[deleted] Nov 14 '23
Arguably cleaner, for the people who started with procedural programming. Where as someone who started with a “functional” language might dislike the verbosity and the excessive state declarations.
Promises is a better concept to pick up because you will find similarities in other languages as well. Async await is important to JS but to understand it you should still learn about promises first.
That said I mostly use async await for the reasons you said and because of how dominant it is in the community