// callback = a function that is passed as an argument // to another function. // used to handle asynchronous operations: // 1. Reading a file // 2. Network requests // 3. Interacting with databases // "Hey, when you're done, call this next." hello(goodbye); function hello(callback){ console.log("Hello!"); callback(); } function goodbye(){ console.log("Goodbye!"); }
@Blitz61wasd Жыл бұрын
@BroCodez Django course please
@Blitz61wasd Жыл бұрын
Bro i subscribed and liked can you make django course
@-_SleepAndEat_-7 ай бұрын
Bro can you do Kali Linux ?
@a1m4thah3d2 ай бұрын
Anytime I'm learning something new and struggling, I watch a BroCode video and walk away totally getting it. I LOVE how everything is clear and concise and not a lot of needless rambling.
@thatlastborn9 ай бұрын
Honestly callbacks really left me confused. This is by far the best explanation I’ve watched. Tysm ❤
@tayangantengahmalam24809 ай бұрын
True
@1992daven10 ай бұрын
I love the way you explain. Those other youtubers had me lost.
@thatlastborn9 ай бұрын
Right!!!
@jimmyhaotran1235 ай бұрын
exactly always got me lost when other youtubers keep on repeating something like, we put another function inside a function as a paramether and in the function block we call back to the function a callback function, that is why it is called a callback function. And then they continue on giving an example of either a function with another function as parameter, or array functions console logging the elements when iterating through the elements. Like why would console log be a callback function, they never explain, This video explains everything to me. Thanks!!!
@isaiahaguilera797311 ай бұрын
Bro, this was the easiest explanation I've ever seen. Thank you!
@masterwitcher3178 ай бұрын
I love how you explain complex topics like this. You really helps me a lot.
@saichaithrik71348 ай бұрын
one of the greatest explanation i have ever seen
@piotrmazgaj3 ай бұрын
This is my seal. I have watched the entire video, understood it, and I can explain it in my own words, thus I have gained knowledge. This is my seal.
@r3dwulf36 ай бұрын
Finally, I understood this. The concept was very confusing when others tried to explain it, and this video made it very simple to understand. Thank you for breaking it down.
@vallunacoder.wecodetogether10 ай бұрын
Fell like I'm finally understanding js. Thanks BRO! Greetings from Colombia!
@3lirez6 ай бұрын
You explained this in the simplest way possible bro! Now I love the “Bro Code” Channel!
@SpeaksYourWord5 ай бұрын
The only freaking madlad that never disappoints. Only one.
@mohitanand56465 ай бұрын
Thank you for those example codes. Those really help with understanding the concept in-and-out of the box.
@usman_acts10 ай бұрын
@BroCodez : an impressive way to teach... A lot to learn in just 7 minutes Love from Lahore, Pakistan
@nononono-pw1tk18 күн бұрын
the profile pic is on spot. you're a giga chad for this vid, i needed someone else to explain this to me cuz i could not understand it from my teacher, thx.
@anitamurphy232310 ай бұрын
And i finally understand. Greetings from Ireland x
@kunalpal664711 ай бұрын
Such a beautiful explanation, Bro...earned a sub!!
@liamrichardson623 ай бұрын
THANK YOU SO MUCH😭. I really needed this⭐
@Saquib-r4n3 ай бұрын
bro i am not understanding the callback since yesterday after ur explanation i m going to subscribe u ASAP!!
@ФёдорСёмочкин7 ай бұрын
Your videos helped me understand JS although i have already watched a lot of videos on JS. Thanks Bro!
@Eldorbek-Yokubjonov7 ай бұрын
the most simple and human understandable explanation thanks bro code
@vedantrawat40647 ай бұрын
Thank You so much before this video I was not able to understand this concept , I am now able to understand better .... Pls provide more such informative videos like this... ❤
@suwaddy15666 ай бұрын
Thanks for explaining callback function.
@sarabadr13769 ай бұрын
Thank you so much for making it so simple and understandable ❤
@ColeHartman15 ай бұрын
One thing I believe could have been clarified is that callback() does not actually WAIT for the line of code above it to be done. If the line above is asynch, it will call callback() first.
@jatinjain108213 күн бұрын
Amazing Explanation . Thank you so much
@rameenana6 ай бұрын
This was very helpful mate. Thanks! Appreciate your work.
@CHANDRASHEKARRAHCS7 ай бұрын
liked the way u explained things so simple and clear keep posting 💌
@girishph.99709 ай бұрын
if you had explained it using the setTimeout function itself it would have been much easier to understand i think , but thankyou.
@otisprogramming24376 күн бұрын
Simple explanation, however I found the example of setTimeout to be open to misinterpretation or a little misleading. If we invoke the callback goodbye after a setTimeout function, the callback would still be logged first. I think due to setTimeout using a callback itself which interacts with the event loop and event queue.
@juancruzsantillanmenendez4254 Жыл бұрын
You're the best, love from argentina!!
@johnnyenglish3867 Жыл бұрын
legend
@FindingFocus6 ай бұрын
this was the video that finally helped this click with me. thank you!!!
@ashutoshsingh58328 күн бұрын
best video on func callback thks man.
@sridhararivazhagan13234 ай бұрын
Thanks for this wonderful explanations I understand this in easy way thanks bro🎉
@hasanatahmadzai90793 ай бұрын
Truely you're the best.
@jauerboo65269 ай бұрын
good explanation!
@flowdesigner19 күн бұрын
Dang! That was a good explanation!!!
@rx808 Жыл бұрын
legend!!
@jadad7296 Жыл бұрын
cool
@zine-el-abidine2 ай бұрын
i got it, thank you your the best !
@zeelrana33693 ай бұрын
Great explanation 👍
@mohammadalsallal79777 ай бұрын
this guy is insane
@elzosantos12539 ай бұрын
Hi, okay, I want to congratulate you for this incredible work, where you share your knowledge. I want to ask a question about how I render the results of the code in the console, so I know how to do it with HTML
@gloryanoliefo7 ай бұрын
Add the relevant script tag in your HTML file and set the src to your javascript file, then go live from your vs code, then navigate to your console in your browser, you will see the changes rendered as you code.
@iambrijeshtoo2 ай бұрын
Thank you ❤
@abdoun82148 ай бұрын
still confused.
@johnwayne80596 ай бұрын
What do you know about promises? Would be interesting to see something about it!
@guilhermemanoel1164 ай бұрын
Goat!
@ikki_nikoo3 ай бұрын
randomComment() // LOVE YOU BRO CODE THANKS YOU!
@kathikr93608 ай бұрын
thank you
@shauryasingh637 ай бұрын
Thanks Bro!!
@SadidIslam2710 ай бұрын
best
@ArthurWM9 Жыл бұрын
So what's the difference between using a function as callback and just calling the function from inside the one which will take some time to finish? Wouldn't this accomplish the same thing? Thanks for the video!
@jesusjosemarthalaborin101411 ай бұрын
I have the same question or is that even a callback function too?
@Shubh_R_M11 ай бұрын
Both works same in most of the cases but there are some points to be consider: 1 ) callback program flow is more controllable 2 ) asynchronous operation execution for e.g in video goodbye is executing later if we write normal hello function and call goodbye function in hello function and after calling goodbye function write another code then if goodbye function takes time to execute then other code after goodbye call will also has time delay . which is not happen in call back case . HOPE THIS HELP : )
@spencersedano6 ай бұрын
Thank you bro code
@Blitz61wasd Жыл бұрын
Django course please
@raghabpandit261012 күн бұрын
if the world ever has international code organization type shi Bro Code should be the president of it
@7calculus5 ай бұрын
But if you use the setTimeout, then even with callback, bye is displayed first.....what's happening here?
@Armaan_Punia_Ай бұрын
i think setTimeout will run only after callback is done, this is 3 mo idk if it helps still
@sportsknowledge9210 ай бұрын
Hi bro code please make small small project using function object array
@lorieldesamito39986 ай бұрын
chad
@albertt7553 ай бұрын
This callback function seems complicated.
@tabaeimohamedamine9243Ай бұрын
@coding_stuff_uz Жыл бұрын
Bro Django please 🥲
@hungry_khid100710 ай бұрын
What is that , is it good?
@coding_stuff_uz10 ай бұрын
@@hungry_khid1007 Yes, of course. It looks like python
@Theoublal Жыл бұрын
Bro react
@saliouseck7715 Жыл бұрын
HI BROCODE THANKS FOR THE VIDEOS WHERE CAN WE CONTACT YOU ?