Тёмный

Callback Functions in JavaScript Explained - Asynchronous JavaScript 

coder awesome
Подписаться 3,1 тыс.
Просмотров 10 тыс.
50% 1

This video explains How and Why Callback functions in JavaScript are used.
This thing called Callbacks or Callback functions came with the concept of Asynchronous Programming in JavaScript.
Asynchronous Programming is The execution of the functions or the events is independent from the main program flow. So, we use Callback functions in JavaScript to implement this.
In this video we use a practical example that callback functions are used in a real life scenario. We discuss How and Why callbacks are used and why it is this important.
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 ?
Create a REST API with NodeJs and MySQL
• Introduction - Create ...
What are the Biggest Mistakes a Programmer Can Make (Get a Fresh Start in 2020) ?
• Beginner Programmer Mi...
Hit Subscribe, smash the Like button and share with your friends.
Visit my blog: coderaweso.me
Like me on Facebook : / coderaweso.me
Follow me on Twitter : / coderaweso_me

Опубликовано:

 

14 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 97   
@coderawesome
@coderawesome 4 года назад
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 ?
@bluelion978
@bluelion978 3 года назад
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!!
@coderawesome
@coderawesome 9 месяцев назад
Thank you so much for your feedback
@lacag-lacag
@lacag-lacag Год назад
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.
@coderawesome
@coderawesome Год назад
Thanks a lot for recommending my video!
@sh4kirrr448
@sh4kirrr448 4 года назад
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!
@coderawesome
@coderawesome 4 года назад
You're very welcome! Glad it helped!
@Abc-sl1nf
@Abc-sl1nf 11 месяцев назад
That was probably the best explanation iv seen in all the videos!! Thank you!!
@coderawesome
@coderawesome 9 месяцев назад
Glad you liked it!
@spytharun576
@spytharun576 7 месяцев назад
thank you for clearly understanding the concept, compared to any other tutorial this is best😊😊😊
@coderawesome
@coderawesome 6 месяцев назад
Glad it was helpful! Thanks fpr the feedback!
@pauli_
@pauli_ 3 года назад
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.
@coderawesome
@coderawesome 3 года назад
Haha Glad you got it.! Thanks for your feedback!
@seekthetruth5458
@seekthetruth5458 3 года назад
This was the best practical example, I finally got the concept after browsing so many videos. Thank you!
@coderawesome
@coderawesome 3 года назад
Glad it was helpful! And thanks for the feedback!
@leogovan5076
@leogovan5076 3 года назад
One of the better explanations I've come across on youtube - thanks!
@coderawesome
@coderawesome 3 года назад
You're most welcome! Glad it was helpful!
@bazooza
@bazooza 2 года назад
Thank you for your clear and unambiguous explanations. They have helped me tremendously.
@coderawesome
@coderawesome 9 месяцев назад
Glad you liked it! You're most welcome!
@tonytony-fc6gq
@tonytony-fc6gq 4 года назад
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
@coderawesome
@coderawesome 4 года назад
Thanks. Glad it helped!
@mohankadolkar1227
@mohankadolkar1227 4 года назад
I loved your explanation and examples. Understood the underlying concept clearly. Suggest become tutor. Thanks a lot
@coderawesome
@coderawesome 4 года назад
Glad you liked it. Thanks a lot!
@oranucarl6018
@oranucarl6018 3 года назад
Wow, best explanation of callbacks I've seen soo far for learners. Nice one..
@coderawesome
@coderawesome 3 года назад
Thanks a lot for your feedback. Much encouraging. 😍
@gpavitra854
@gpavitra854 3 года назад
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.
@gstakhov
@gstakhov 3 года назад
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.
@kalyanbellamkonda8653
@kalyanbellamkonda8653 4 года назад
awesome please make more videos on javascript ur explanations are pretty good and easy to understandable thank you bro.
@coderawesome
@coderawesome 4 года назад
Thanks a lot. Yes I'm looking forward to.
@shahrulamir983
@shahrulamir983 2 года назад
Dude your video is awesome! Keep it up!
@coderawesome
@coderawesome 2 года назад
Thank you so much!
@suryaguthula6531
@suryaguthula6531 4 года назад
Excellent..Very Well Explained..
@coderawesome
@coderawesome 4 года назад
Thanks a lot
@chiranjeevigadamsetty3439
@chiranjeevigadamsetty3439 3 года назад
Very good explination and i really liked it ,keep doing more thank you
@coderawesome
@coderawesome 3 года назад
Glad you liked it! And you're most welcome!
@muhamedelsayed2127
@muhamedelsayed2127 3 года назад
The way you explained it was just simple , I really liked that , well done bro .
@coderawesome
@coderawesome 3 года назад
Glad it helped you! You're most welcome!
@insaneguy5007
@insaneguy5007 4 года назад
Sir, I have watched may tutorials to understand the concept of callback() , but literaly I couldn't understand anything , but after watching your tutorial 😍
@coderawesome
@coderawesome 4 года назад
Glad to hear that! Thanks a lot!
@insaneguy5007
@insaneguy5007 4 года назад
@@coderawesome sir,can you do any small node js project in this channel ?
@coderawesome
@coderawesome 4 года назад
@@insaneguy5007 I'm currently conducting a series about Building a REST API with NodeJS. You might like it. ru-vid.com/group/PLG3j59vX4yLHA-wCw7KDP-i0r10ZrckqG
@l4ck833
@l4ck833 3 года назад
The best explanation out there. Thank you!
@coderawesome
@coderawesome 3 года назад
Thanks! I'm really happy that you liked it!
@victora3155
@victora3155 4 года назад
Well explained. Thanks
@coderawesome
@coderawesome 4 года назад
Glad it was helpful!
@areyoukidding6274
@areyoukidding6274 3 года назад
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..
@EnesKab
@EnesKab 3 года назад
callback patterns can be both synchronous or Asynchronous. For example, setTimeout is Asynchronous, but filter is synchronous.
@shailajapai9607
@shailajapai9607 3 года назад
Got it , finally! Thank you so much
@coderawesome
@coderawesome 3 года назад
Glad it helped!
@AlexSenichek
@AlexSenichek 3 года назад
Good explanation. Thanks.
@coderawesome
@coderawesome 9 месяцев назад
Glad you liked it! You're most welcome!
@Kaaaaakl
@Kaaaaakl 3 года назад
U really know how to teach.👍👍👍👍 N thanks
@coderawesome
@coderawesome 3 года назад
My pleasure! Thanks a lot for your encouragement.
@AndresGuerrero
@AndresGuerrero 4 года назад
Great job of explaining this topic 👍🏽
@coderawesome
@coderawesome 4 года назад
Thank you!
@kapilgarg7758
@kapilgarg7758 3 года назад
Nice clean tutorial
@coderawesome
@coderawesome 3 года назад
Glad you liked it. Thanks a lot!
@TheSansaz
@TheSansaz 3 года назад
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.
@coderawesome
@coderawesome 9 месяцев назад
Just wanted to demo the functionality of a real life asynchronouse function which takes some time to complete.
@sh4kirrr448
@sh4kirrr448 4 года назад
This guy's a legend!
@coderawesome
@coderawesome 4 года назад
Thanks a lot! :)
@AnujaChirantha
@AnujaChirantha 4 года назад
Really Usefull.Keep it up.
@coderawesome
@coderawesome 4 года назад
Thanks a lot ayye ❤
@twsaif
@twsaif 4 года назад
Thank you sir great explanation 👍❤️
@coderawesome
@coderawesome 4 года назад
Thanks a lot for your feedback!
@luispereira3951
@luispereira3951 3 года назад
Really helped !!!
@coderawesome
@coderawesome 9 месяцев назад
Glad you liked it! You're most welcome!
@sadaffatima853
@sadaffatima853 3 года назад
greatt explaination
@coderawesome
@coderawesome 3 года назад
Thanks a lot!
@hashanliyanage5173
@hashanliyanage5173 4 года назад
Great aiya.Good explanation 💜
@coderawesome
@coderawesome 4 года назад
Thanks malli 😍
@PremKumar-dn5zm
@PremKumar-dn5zm 4 года назад
Excellent example. Good job brother!!
@coderawesome
@coderawesome 4 года назад
Glad you liked it!
@PremKumar-dn5zm
@PremKumar-dn5zm 4 года назад
You deserve!!
@danielakoyleek3757
@danielakoyleek3757 Год назад
Thanks a lot
@coderawesome
@coderawesome Год назад
Most welcome
@psjaison
@psjaison 3 года назад
What if i need to return something in callback function ?
@coderawesome
@coderawesome 3 года назад
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.
@psjaison
@psjaison 3 года назад
@@coderawesome thanks for the clarity. appreciate your response. This is the simplest of all videos i have seen explaining call back. Thanks again
@buenosaires2727
@buenosaires2727 2 года назад
Thank you
@coderawesome
@coderawesome Год назад
You're welcome
@girishpandey9976
@girishpandey9976 3 года назад
nice explaination
@coderawesome
@coderawesome 3 года назад
Thanks and welcome!!
@ankhkhepry4350
@ankhkhepry4350 3 года назад
Thanks bro
@coderawesome
@coderawesome 3 года назад
You're most welcome!
@nicolascedanoavena6054
@nicolascedanoavena6054 3 года назад
you rock!!!
@coderawesome
@coderawesome 3 года назад
Thanks brother. Glad you liked it!
@EnesKab
@EnesKab 3 года назад
setTimeout is not a JS function.
@coderawesome
@coderawesome 9 месяцев назад
Thanks for your feedback!
@aussieclicks96
@aussieclicks96 4 года назад
Good job ✌️
@coderawesome
@coderawesome 4 года назад
Thank you so much 😀
@kamilmohammed9722
@kamilmohammed9722 3 года назад
Thanks
@coderawesome
@coderawesome 3 года назад
You're welcome!
@humaenist
@humaenist Год назад
I don't understand why other teachers can't explain it the way you did... or am I stupid?
@coderawesome
@coderawesome Год назад
Thanks! I'm glad you enjoyed the video!
@sachingoel9866
@sachingoel9866 4 года назад
That style is known as teaching. compare to Others they are just trying to convey what they have learned.
@coderawesome
@coderawesome 4 года назад
Thanks a lot!!!!
Далее
Async JavaScript - Callbacks, Promises, Async/Await
25:10
А я с первого раза прошла (2024)
01:00
Understanding JavaScript Callbacks
15:39
Просмотров 115 тыс.
Callbacks in JavaScript Explained!
14:03
Просмотров 153 тыс.
JavaScript Callback Functions
11:56
Просмотров 33 тыс.
The Async Await Episode I Promised
12:04
Просмотров 1,1 млн