This is the best video i have ever seen on the callback functions. I am struggling to understand on the callback functions till date and this video made my day. Thank you so much for making this amazing content.
I love how succinctly you explain things. Instead of using a bunch of terms that only advanced developers understand. You're meat and potatoes when it comes to teaching. Keep it up!
I am coming from the Odin Project. I am still fairly a beginner so I more or less didn't quite understand a lot. I was interested to understand what were call back functions. Will for sure come back later for a deeper dive in functions. I am sure you have a great explanation.
I feel this. I've been coding for 4 months and my mentor pushed me to this topic. I am way over my head and need to go back for some fundamentals practice
excellent video mate!! bitesize knowledge for JS is so much more useful than sitting through anything longer where the person starts to waffle. Your examples are great too and extremely well scaffolded!!
I gave you like immediatelly when I saw how easily and well you explain everything and later when I saw pokemon example which I really liked I wanted to give you another like but then I realised I already did it so I gave you subscription. well done ^_^
I couldn't understand the concept of cb function even watching videos in my language (spanish), your explanation was definetely the best by far. Thank you very much
1,3,2 cause async tasks are taken care by the event loop, and event loop monitor that the stack should always be empty, if empty then it will take the CB(call back) to stack and callstack will immediately execute the CB
YOURE SO DAMN AMAZING! I mean, its kinda sad that I've saw you for the first time after like 2 years of starting coding but it's worth it anyways, best dev channel, keep it up!
Would love to see a practical real world example of why and where you would use Currying, most people always show non real world useless non practical examples. Thanks for all your great videos James 😃 👍
James, please help me understand something. It is one last JS weirdness left for me that I can't grasp having strong C# background. I will try the simplest example I can think of. So each JS developer say it should be like this: function simpleCallbackFn (){} function simpleCallerFn (cb){ cb();} simpleCallerFn (simpleCallbackFn); Why not like this: function simpleCallbackFn (){} // Same as before function simpleCallerFn (){ simpleCallbackFn ();} // We do not pass a callback, we simply call the it from within. It is within perfectly visible scope. simpleCallerFn (); We call the "callback" function from within the caller function and to me this should be perfectly fine and achieve the same result. Thank you. Greetings from Bulgaria. Well, trying to please you :) . And to be nice.
I'm confused, why would you not just use await, for example: let result = await someFunction(); console.log(result) Doesn't this achieve the exact same thing?
I like the explanation with the oil change. It would be nice, if the example code resembles the oil change, to transfer this conversation to JS. Anyways. Good explanation.
Could you please create video that show how to solve the uncheck runtime.lastError in Chrome and how to turn off Debugger on Chrome as well. It's too annoying.
1, 3, 2
it will firstly fire off all the functions from the stack. When the stack is completed, it will go over all the events
you win the prize. this is why i love javascript
i couldnt understand this until i learnt how the stack worked
@@MUSHIN_888 any resources you might share?
I have never learned a programming concept just in 12 seconds. Keep up the good work James.
This is the best video i have ever seen on the callback functions. I am struggling to understand on the callback functions till date and this video made my day. Thank you so much for making this amazing content.
Nice explanation. A video on the different ways to define a function in JavaScript and when they should be used would be helpful.
Yeah that’s a great idea!
1,3,2
setTimeout (Web APIs -> Task Queue -> Call Stack (using event loop). It'll only run after the synchronous operation is done.
The mechanic example made me understand everything really fast. Thank you 🙂
This is actually really useful. Helped me understand my really weird bug when developing a chrome extension
Thanks for the lesson, you have a gift of being concise and provide valuable information!
So glad to hear that!
I love how succinctly you explain things. Instead of using a bunch of terms that only advanced developers understand. You're meat and potatoes when it comes to teaching. Keep it up!
I am coming from the Odin Project. I am still fairly a beginner so I more or less didn't quite understand a lot. I was interested to understand what were call back functions. Will for sure come back later for a deeper dive in functions. I am sure you have a great explanation.
I feel this. I've been coding for 4 months and my mentor pushed me to this topic. I am way over my head and need to go back for some fundamentals practice
Very well explained for beginners like myself. This is very useful. Thank You for sharing.🎉🎉
Awesome James . Love the oil change analogy .
excellent video mate!! bitesize knowledge for JS is so much more useful than sitting through anything longer where the person starts to waffle. Your examples are great too and extremely well scaffolded!!
Thanks. Very nicely explained! Got it.
I gave you like immediatelly when I saw how easily and well you explain everything and later when I saw pokemon example which I really liked I wanted to give you another like but then I realised I already did it so I gave you subscription. well done ^_^
Brilliant explanation! Efficiency at its best 👌🏻
Nice and easy walkthru. Thx so much
Thanks, I needed a refresher. Great video.
So glad it helped!
I couldn't understand the concept of cb function even watching videos in my language (spanish), your explanation was definetely the best by far. Thank you very much
What theme are you using in your VSCode?
It's so clean to see.
Shades of purple
love your content. always a supporter of your content James.
Thank you so much!
understood in the first 10 seconds thanks
thank you it was really helpful
that was quick, and quickly you have a subscriber.
hehe thanks!
thanks for precise explain, only one that make me understand
Hi James definetly would be nice to have a 5min video on es6 arrow functions
Absolutely!
WOWWWWWWWW! I JUST GOT IT, THIS IS SO POWERFUL!!!!
Yeahhhhh!!
Thank you James!
Liked and subscribed just for the mere fact you like pokemon, too. Great video! thanks!
I'll take it!
Thanks James great video.
very nice effective & efficient video
Yay! Glad to hear it!
This helped me a lot you explain things fantastically!
1,3,2 cause async tasks are taken care by the event loop, and event loop monitor that the stack should always be empty, if empty then it will take the CB(call back) to stack and callstack will immediately execute the CB
Hey, please tell me:
1. What theme are you using for the ide
2. How does your cursor is blinking such cool way
Just discovered this chanel and I am hitting the subscribe button without any hesitation.. Keep going any tutorial for rest api and react ?
Great tutorial. Thanks
What's the font are you using?
Cascadia Code
excellent explanation! 👏🏽
YOURE SO DAMN AMAZING! I mean, its kinda sad that I've saw you for the first time after like 2 years of starting coding but it's worth it anyways, best dev channel, keep it up!
So nice, Thank you for tutorial
I don't know if you're still answering questions but what kind of vscode theme do you use that looks awesome
Fantastic explanation, thank you!
Very simple and well explained. Thank you!
Thanks a lot!💌 and Could u tell me what theme u use in vs code?😊
Thanks James!
Great little tutorial! By the way, what font do you use in this video? I really like it!
Cascadia code :)
Thank you!
If I were you, I would definitely name my two dogs Ekans and Koffing
LOL. You are so humerus ! I get the idea quickly thank you!
Would love to see a practical real world example of why and where you would use Currying, most people always show non real world useless non practical examples. Thanks for all your great videos James 😃 👍
Just when I re-visit & think I see the purpose of currying, I then forget all about it immediately after not finding a real world use.
Very much agree
Really this is helpfull. Thank you
Awesome tutorial James. Would you do make video about nested async callback function too ?
thanks. greetings from ph
Hello James! the functions loadPokemon how is it asynchronous? is it because fetch is asynchronous ?
Yep the function has to be marked as async because we use await for the async fetch call.
Thanks for the video
James, please help me understand something. It is one last JS weirdness left for me that I can't grasp having strong C# background.
I will try the simplest example I can think of. So each JS developer say it should be like this:
function simpleCallbackFn (){}
function simpleCallerFn (cb){ cb();}
simpleCallerFn (simpleCallbackFn);
Why not like this:
function simpleCallbackFn (){} // Same as before
function simpleCallerFn (){ simpleCallbackFn ();} // We do not pass a callback, we simply call the it from within. It is within perfectly visible scope.
simpleCallerFn ();
We call the "callback" function from within the caller function and to me this should be perfectly fine and achieve the same result.
Thank you. Greetings from Bulgaria. Well, trying to please you :) . And to be nice.
very clear,wonderful!!
Yay, thank you!
Excelente video, claro y al punto! 💪💪
Great video .. thanks 😃👍
Glad you enjoyed it!!
I'm confused, why would you not just use await, for example:
let result = await someFunction();
console.log(result)
Doesn't this achieve the exact same thing?
Can you make project using web worker?
To understand about using web worker.
how would you make the example behave synchronous, in order to yield 1,2,3 ?
iirc the example should log out 1 3 2, since setTimeout() is a macrotask. It's been a while since I delved into async javascript tho
Love it!
is there a way to output 1,2, 3 instead?
thank you, cool video
Hi, what software are you using in this video to do the actual coding? Can anybody provide me an answer, please
clearly vs code
What is difrnce between callbcaks and closures does both simply help put a function within a function
thanks so much!!
I learned more in this video about callbacks than in 2 semesters of computer science... Thank you so much!!
Sounds like you went to the wrong university
@@R3fuge it happens a lot in latin america.
Glad it was helpful!
I like the explanation with the oil change. It would be nice, if the example code resembles the oil change, to transfer this conversation to JS. Anyways. Good explanation.
Very goo video. Thanks. S-
Glad you liked it!
So unless I don't read the documentation, I cannot know the number and type of the parameters of that callback function.
what kind of theme are you using on your vs code pls?
Now i am more confused, cant i just use that callback function directly without calling it as variable in the function
Which font are you using?
Cascadia Code
Can anyone tell me the VS code theme used here?
shades of purple
excellent 🔥
3:05, line 3, does the first (name) needs brackets?
Pretty cool !
Thanks for watching ;)
What name of background theme you use
What is the difference between function foo(){} and let foo = ()=>{}
at 1:40 why did he has to swap the codes? arn't functions run where ever there in javascript? Some one pls explain
1, 3, 2 because of the event loop
Can i know the theme you are using in vs code
I need your help with arrow functions lol please James thx
1, 3, 2 sequence for print of numbers.
please what is this text editor
1, 3 and 2 😊👌
Nice!
I still didnt understand how does cb() work, what is it doing
Could you please create video that show how to solve the uncheck runtime.lastError in Chrome and how to turn off Debugger on Chrome as well. It's too annoying.
great, now please add the async await in all that stuff. Cause thats what makes it confusing to new developers.
Good idea!
you explained it in 60 seconds actually.
1,3,2, even with setTimeout 0 it'll be 1,3,2
greatone
As a dad joke connaisseur, I appreciate your similary cheesy intro jokes.
i understand callbacks in starting 15 sec
Good work!
Me encantaría una lista de reproducción sobre cómo consumir apis. con este tema y otros en los que un principiante suele luchar
Ah buena idea! Yo la anadire al “backlog” :)
Excellent example in the beginning.. just too fsst later.. 😅
Ah sorry to hear that. Thanks so much for the feedback!
why couldnt we just call the function instead of passing it as an argument, we get access to functions any way
Output:
1
3
2
Lost with those arrows 😢
1 ,3 ,2 , if you have knowledge about event loop then you will get this
That's right!