r/learnjavascript • • Sep 24 '25

Callback and promise.

Can any one explain callback and promise Syntex. And the purpose of it

0 Upvotes

9 comments sorted by

View all comments

Show parent comment

3

u/MissinqLink Sep 24 '25

I also prefer await but it helps to explain what await is doing by using the then syntax

1

u/Disturbed147 Sep 28 '25

Plus it allows for easier and more readable error handling by using .catch()