00:25 - What is Asynchronous Programming ? 01:10 - Why Asynchronous Programming ? 01:34 - What is Callback functions ? 02:05 - Example - Callback functions in Real life ?
I had gone through several tutorials trying to understand callbacks. Finally with your superb explanation and great example, I finally understood it clearly. As a beginner, I am so happy that I now fully understand arrow functions and callbacks. Thanks!!
For any who is looking for to understand callback don't go back u got what u looking just give it a time and try to understand it, this guy explained it easly, i have several other youtube video and none of them made me understand it.
Thanks a ton bro, you're the best teacher on this topic. I've been struggling to get this one down since yesterday but no one taught it the way you did here. Thank you again!
Hey Thank you for the explanation. Please resolve one doubt - the callBack() function call which indicates hideLoadingScreen() inside getDatFromAPI() should be called outside setTimeOut() is what I presume as we are awaiting for getting the data for 2 sec and post which the loading screen should go away. Please explain.
I had the same question. Otherwise you're forcing that callback() to wait inside the setTimeout() so what does it prove?? You can just have a console.log() in that setTimeout() and it will work the same way.
Callbacks are getting called by nobody (except the browser or the server). You just pass them as arguments of another function. And they get executed. So, if you return something in a callback function, there's nobody to catch it. So, we don't normally return values in a callback and use that value in somewhere else. Instead we do the whole thing inside the callback.
Sir, I have watched may tutorials to understand the concept of callback() , but literaly I couldn't understand anything , but after watching your tutorial 😍
@@insaneguy5007 I'm currently conducting a series about Building a REST API with NodeJS. You might like it. ruclips.net/p/PLG3j59vX4yLHA-wCw7KDP-i0r10ZrckqG
Brother, I really don't understand one thing.. When we use callback function then it should be called as synchronous( 1 2 3 4 -> based on your output) .. When we DON'T use callback function then it should be called as asynchronous because it didn't wait for the flow of the program( 1 2 4 3 -> based on your output).. But when u explain why u said other way round that is using callback is called asynchronous.. I am so confused.. if can please explain or make one video for that.. PLEASE!!! I am asking you because i saw so many videos and your video is something understandable..
Your explantion is clean, but more accuracy would be great: The first out of order result is caused by a callback function passed in setTimeout, not because the execution took time. Callback functions by default are synchronous in nature and that is what presented here. I wonder why is there no explanation about asychronous callbacks as in setTimeout, readFile,etc.
00:25 - What is Asynchronous Programming ?
01:10 - Why Asynchronous Programming ?
01:34 - What is Callback functions ?
02:05 - Example - Callback functions in Real life ?
I had gone through several tutorials trying to understand callbacks. Finally with your superb explanation and great example, I finally understood it clearly. As a beginner, I am so happy that I now fully understand arrow functions and callbacks. Thanks!!
Thank you so much for your feedback
Thank you for your clear and unambiguous explanations. They have helped me tremendously.
Glad you liked it! You're most welcome!
For any who is looking for to understand callback don't go back u got what u looking just give it a time and try to understand it, this guy explained it easly, i have several other youtube video and none of them made me understand it.
Thanks a lot for recommending my video!
That was probably the best explanation iv seen in all the videos!! Thank you!!
Glad you liked it!
Thanks a ton bro, you're the best teacher on this topic. I've been struggling to get this one down since yesterday but no one taught it the way you did here. Thank you again!
You're very welcome! Glad it helped!
Hey Thank you for the explanation. Please resolve one doubt - the callBack() function call which indicates hideLoadingScreen() inside getDatFromAPI() should be called outside setTimeOut() is what I presume as we are awaiting for getting the data for 2 sec and post which the loading screen should go away. Please explain.
I had the same question. Otherwise you're forcing that callback() to wait inside the setTimeout() so what does it prove?? You can just have a console.log() in that setTimeout() and it will work the same way.
I've consumed so many of these videos and this has explained it much better than anything else. I'm in danger of finally getting it! Thank you.
Haha Glad you got it.! Thanks for your feedback!
One of the better explanations I've come across on youtube - thanks!
You're most welcome! Glad it was helpful!
This was the best practical example, I finally got the concept after browsing so many videos. Thank you!
Glad it was helpful! And thanks for the feedback!
WOW, YOU EXPLAINED it very well, i watched soo many videos on youtube, they seemed to make it more complicated , BUT YOU simplified callback functions
Thanks. Glad it helped!
thank you for clearly understanding the concept, compared to any other tutorial this is best😊😊😊
Glad it was helpful! Thanks fpr the feedback!
Dude your video is awesome! Keep it up!
Thank you so much!
Wow, best explanation of callbacks I've seen soo far for learners. Nice one..
Thanks a lot for your feedback. Much encouraging. 😍
The way you explained it was just simple , I really liked that , well done bro .
Glad it helped you! You're most welcome!
The best explanation out there. Thank you!
Thanks! I'm really happy that you liked it!
What if i need to return something in callback function ?
Callbacks are getting called by nobody (except the browser or the server). You just pass them as arguments of another function. And they get executed. So, if you return something in a callback function, there's nobody to catch it. So, we don't normally return values in a callback and use that value in somewhere else. Instead we do the whole thing inside the callback.
@@coderawesome thanks for the clarity. appreciate your response. This is the simplest of all videos i have seen explaining call back. Thanks again
I loved your explanation and examples. Understood the underlying concept clearly. Suggest become tutor. Thanks a lot
Glad you liked it. Thanks a lot!
Got it , finally! Thank you so much
Glad it helped!
Excellent..Very Well Explained..
Thanks a lot
Sir, I have watched may tutorials to understand the concept of callback() , but literaly I couldn't understand anything , but after watching your tutorial 😍
Glad to hear that! Thanks a lot!
@@coderawesome sir,can you do any small node js project in this channel ?
@@insaneguy5007 I'm currently conducting a series about Building a REST API with NodeJS. You might like it.
ruclips.net/p/PLG3j59vX4yLHA-wCw7KDP-i0r10ZrckqG
awesome please make more videos on javascript ur explanations are pretty good and easy to understandable thank you bro.
Thanks a lot. Yes I'm looking forward to.
Excellent example. Good job brother!!
Glad you liked it!
You deserve!!
Very good explination and i really liked it ,keep doing more thank you
Glad you liked it! And you're most welcome!
Great job of explaining this topic 👍🏽
Thank you!
Brother, I really don't understand one thing.. When we use callback function then it should be called as synchronous( 1 2 3 4 -> based on your output) .. When we DON'T use callback function then it should be called as asynchronous because it didn't wait for the flow of the program( 1 2 4 3 -> based on your output).. But when u explain why u said other way round that is using callback is called asynchronous.. I am so confused.. if can please explain or make one video for that.. PLEASE!!! I am asking you because i saw so many videos and your video is something understandable..
callback patterns can be both synchronous or Asynchronous. For example, setTimeout is Asynchronous, but filter is synchronous.
Well explained. Thanks
Glad it was helpful!
Nice clean tutorial
Glad you liked it. Thanks a lot!
U really know how to teach.👍👍👍👍 N thanks
My pleasure! Thanks a lot for your encouragement.
Really Usefull.Keep it up.
Thanks a lot ayye ❤
Great aiya.Good explanation 💜
Thanks malli 😍
Good explanation. Thanks.
Glad you liked it! You're most welcome!
This guy's a legend!
Thanks a lot! :)
Your explantion is clean, but more accuracy would be great:
The first out of order result is caused by a callback function passed in setTimeout, not because the execution took time. Callback functions by default are synchronous in nature and that is what presented here. I wonder why is there no explanation about asychronous callbacks as in setTimeout, readFile,etc.
Just wanted to demo the functionality of a real life asynchronouse function which takes some time to complete.
Really helped !!!
Glad you liked it! You're most welcome!
Thank you sir
great explanation 👍❤️
Thanks a lot for your feedback!
setTimeout is not a JS function.
Thanks for your feedback!
greatt explaination
Thanks a lot!
Thanks a lot
Most welcome
Thank you
You're welcome
nice explaination
Thanks and welcome!!
Thanks bro
You're most welcome!
Good job ✌️
Thank you so much 😀
That style is known as teaching.
compare to Others they are just trying to convey what they have learned.
Thanks a lot!!!!
Thanks
You're welcome!
you rock!!!
Thanks brother. Glad you liked it!
I don't understand why other teachers can't explain it the way you did... or am I stupid?
Thanks! I'm glad you enjoyed the video!