MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/WebdevTutorials/comments/k5vmj7/what_are_callback_functions_in_javascript_and_how/
r/WebdevTutorials • u/amitav79 • Dec 03 '20
4 comments sorted by
3
Honest question. Is there any reason to use a callback over a Promise? Once I learned Promises I stopped finding the need to code callbacks.
3 u/amitav79 Dec 03 '20 Absolutely not. Promises are better way to write async code than callbacks. But before using Promises one should know the concept of callbacks and why to go for promises. 1 u/SweatyAnReady14 Dec 03 '20 True true. 2 u/[deleted] Dec 03 '20 Now use observables!
Absolutely not. Promises are better way to write async code than callbacks. But before using Promises one should know the concept of callbacks and why to go for promises.
1 u/SweatyAnReady14 Dec 03 '20 True true.
1
True true.
2
Now use observables!
3
u/SweatyAnReady14 Dec 03 '20
Honest question. Is there any reason to use a callback over a Promise? Once I learned Promises I stopped finding the need to code callbacks.