JavaScript the Hard Parts: How to Understand Callbacks & Higher Order Functions

  Рет қаралды 76,720

Codesmith

Codesmith

Күн бұрын

Watch Codesmith CEO, Will Sentance dive deeper into callbacks & higher order functions!
For more videos and free challenges - code with us on our online learning platform CSX - csx.codesmith.io/
SUBSCRIBE for more! 👉tinyurl.com/codesmithsub 👈
Stay connected to our community!
Codesmith: www.codesmith.io/
Learn JavaScript for Free: csx.codesmith.io/
Free Events & Workshops: www.codesmith.io/coding-events
Follow us to stay updated!
Facebook: / codesmithhq
Instagram: / codesmithio
Twitter: / codesmith_
LinkedIn: / codesmith-llc
#codesmith #javascript #learntocode

Пікірлер: 126
@laffed2045
@laffed2045 4 жыл бұрын
that was pure, great pedagogy. I want this guy to teach me how to make a sandwich just in case I've been missing something profound about putting turkey on bread.
@ryan.connaughton
@ryan.connaughton 3 жыл бұрын
xD
@mandeeprandhawa8430
@mandeeprandhawa8430 3 жыл бұрын
Wow. I have never seen anyone so engaged with the students. He made everything not just fun, but so very simple to understand. This guy is gold!
@yourdadishere
@yourdadishere 2 жыл бұрын
Uh, I actually used to be this engaged with my students. It's a sign of pedagogic brilliance.
@rogut8
@rogut8 5 жыл бұрын
This is what I call The Teacher. Truly great content Sir
@emilryden8306
@emilryden8306 3 жыл бұрын
This is absolute top-tier , high-end material for those that are not just out to get a simple quick-n-dirty-done-in-60-sec explanation, but want's to understand the why's and how's of it. 10/10.
@Codesmith
@Codesmith 3 жыл бұрын
Cheers Emil - glad you enjoyed it - we want to do some more content like this -any topics you'd want?
@emilryden8306
@emilryden8306 3 жыл бұрын
@@Codesmith As an MSc in Mech. Eng that just started re-schooling myself from supply chain management to coding I really enjoy this teaching approach. takes me back to Uni and the professors that actually were involved and had a passion for the subject. Something magical happens in that room when you explain something on a board in front of others and asking questions. That said, I’m currently doing a course on Udemy called web dev. bootcamp 2021 which is quite broad in its scope, although i feel that alot of topics are either not given their justified time for explanation, or theyre complete word sallads. If it were up to me I would like to have much (if not all) of JavaScript explained like this, from the bottom up. Maybe divide it into different levels (beginner - intermediate - advanced) ? Im convinced from my engineering studies that its not until you explain the basics in such a explicit and straightforward way, that youre able to fully grasp the road and future problems ahead in a much quicker and effective way. Id pay for it.
@Codesmith
@Codesmith 3 жыл бұрын
@@emilryden8306 Thanks Emil - super helpful - there'll be a Node.js one coming soon and React as well hopefully. Congrats btw on the progress you've been making 🙏
@EmilyHopeGrove
@EmilyHopeGrove Жыл бұрын
@@emilryden8306 I so agree, this is what I was hunting for, and couldn't find in among the top results from youtube, hence my comments and like and save and share I just did because I want to help it boost up! Everyone out there reading this in the future, if you found it helpful seriously do all the things I just mentioned because that helps with the SEO end of things for this video. Get it up to the top of the results when searching for callback explanations, it needs to be there!
@Santon-Motho
@Santon-Motho 9 ай бұрын
His teachings really make you feel like you've finally set on the real path to the mastery of JS.
@ryan.connaughton
@ryan.connaughton 3 жыл бұрын
Teaching is truly an art. When explained like this it just clicks. Well done, Picasso!
@latinstuff1
@latinstuff1 2 жыл бұрын
man I want classes with this man from zero to finish he is so good
@Me-og5iy
@Me-og5iy 3 жыл бұрын
you are not human, you are god!
@andreorellana9016
@andreorellana9016 3 жыл бұрын
This guy is an incredible teacher but no teacher could have prevented me from drifting away in my own thought at the part where you said you had a funny story about 'nought' and 0. Please Will, tell us.
@cannabisanomaly
@cannabisanomaly Жыл бұрын
Two years and I still want to know what it was
@JohnBartmannMusic
@JohnBartmannMusic 2 жыл бұрын
More tuts should be this real. Thank you for making me feel more like an actual student of code.
@arjunvaidy8466
@arjunvaidy8466 Жыл бұрын
The best ever explanation for Higher order and callback!!
@jacked6
@jacked6 5 жыл бұрын
Amazing series!! So detailed and learning a ton.
@richie.edwards
@richie.edwards 3 жыл бұрын
It's amazing how much quicker one learns after "digging deep" and understanding the fundamentals well. Thanks @Codesmith
@theoneandonly6765
@theoneandonly6765 2 жыл бұрын
Totally agreed, spending weeks and weeks learning different methods and algorithms only prepares you for specific situations. But learning the WAY that Javascript works helps you to actually understand what is going on, and makes it so much easier to get better at writing code
@dawid_dahl
@dawid_dahl 5 жыл бұрын
Wow, so happy I found this channel. Instant subscribe for anyone who can teach this well! Excited to watch more videos!
@gustavomonte6672
@gustavomonte6672 3 жыл бұрын
I think MDN should use this guy as a reference when trying to explain a topic.
@Codesmith
@Codesmith 3 жыл бұрын
I'd love to do a video on understand MDN docs at some point
@jaggyjut
@jaggyjut 4 жыл бұрын
by far the best training session on callbacks. Really like the step by step walkthrough. Thank you
@laurenlauren369
@laurenlauren369 3 жыл бұрын
Thank you!! I can finally understand higher order functions!!!
@procamania
@procamania 3 жыл бұрын
definitely clears very muddy water. Thank you so much.
@ronakb1
@ronakb1 5 жыл бұрын
This is what I was looking for. Its 2:16 a.m (PT) and now I understand the fundamentals of HOF. Best Explanation Ever. Thank you Codesmith. :)
@AlexQ6
@AlexQ6 2 жыл бұрын
This was actually such an excellent, in depth, engaging, step by step lecture. Thank you for uploading it!
@Pharizer
@Pharizer 2 жыл бұрын
Love these videos! Keep them coming, please!
@minfoodtravels
@minfoodtravels Жыл бұрын
i learned more from this video in the first 15 minutes than all the research, reading, and course work. Or maybe this really pushed my brain to actually understand everything ive been working on. Thanks a lot, hope to see another workshop from you.
@DigAddley
@DigAddley 2 жыл бұрын
Amazing work! Taught so clearly and alongside the students to make sure they understand correctly. Only wish my previous teachers put that much effort into concepts like this.
@ryebass
@ryebass 3 жыл бұрын
Without any hyperbole, this is the THE rigorous explanation of callbacks and higher-order functions I was searching (desperately) for; thanks so much for this!
@stiffcod5250
@stiffcod5250 3 жыл бұрын
Wow that's fabulous, I mean the way you teach JS is just incredible. You are a real teacher.
@jfur5881
@jfur5881 3 жыл бұрын
Wow, thanks so much for this! I wish I could have you as my teacher.
@antonyantony7714
@antonyantony7714 Жыл бұрын
You are the best sir i have been trying to understand this concept flr the past 2 days i only got to understand it after this video
@tf1n
@tf1n 3 жыл бұрын
Very helpful video! Thank you very much! Your students sound like a sharp bunch, as well.
@ElvenIvy07
@ElvenIvy07 4 жыл бұрын
Brilliant! Loving your videos! :D
@mcdthedev
@mcdthedev Жыл бұрын
just discovered this channel my goodness thank you was getting more confused from reading MDN docs with no explanations and clarity now if i reread MDN docs this topic will make sense
@manuelmedina6909
@manuelmedina6909 4 жыл бұрын
Excellent Explanation!
@Lucromick13
@Lucromick13 Жыл бұрын
You're a great teacher Will!
@mydadletsmeshootatcats6754
@mydadletsmeshootatcats6754 4 жыл бұрын
Excellent explanation.
@smallsir7306
@smallsir7306 2 жыл бұрын
Wow, your videos are extremely good to be free. Thank you so much Sir. If you can teach me JavaScript, I'll be very good at it. Lucky were those guys who were physically under the influence of your voice. You're great Sir
@womilojuoluwatobi1015
@womilojuoluwatobi1015 Жыл бұрын
This teaching is awesome.
@goodgoodmike
@goodgoodmike Жыл бұрын
Awesome explanation, thanks!
@BNakato
@BNakato 4 жыл бұрын
Great content!!🏅🏅
@ahstephenson4069
@ahstephenson4069 3 жыл бұрын
i've been struggling to get my head around this for the past three evenings, finally makes sense now!! Thank you very much
@Codesmith
@Codesmith 3 жыл бұрын
Really glad it helped :)
@pheeuh
@pheeuh Жыл бұрын
He is an amazing instructor!
@EmilyHopeGrove
@EmilyHopeGrove Жыл бұрын
This. All of this. SO detailed. The line by line, bit by bit explanation. Thank you so so much!
@Codesmith
@Codesmith Жыл бұрын
You're so welcome!
@zdargahi
@zdargahi 3 жыл бұрын
Best Javascript educator
@nadineedwards1737
@nadineedwards1737 Жыл бұрын
He's an amazing teacher!
@psk177
@psk177 Жыл бұрын
The absolute BEST!
@srikanthvaijapur2315
@srikanthvaijapur2315 3 жыл бұрын
Loved your explanation sir.. Cleared my confusion.. Thank you❤️ from India
@mentoriii3475
@mentoriii3475 2 жыл бұрын
i feel lucky that i found your videos 2 years ago, I come back to binge watch your videos from time to time and obviously I highly suggest your videos to all people i know who get into web development
@Codesmith
@Codesmith 2 жыл бұрын
Thank you Mentoriii - hopefully we'll have some new content soon!
@gilessteiner286
@gilessteiner286 Жыл бұрын
Great explanation, as always :)
@rocio9714
@rocio9714 7 ай бұрын
Brilliant! It has been very enlightening for me. Thank you very much😀
@Codesmith
@Codesmith 7 ай бұрын
Thank you, Rocío!
@karimmuhammad7051
@karimmuhammad7051 Жыл бұрын
How amazing, Really Awesome! Very clear, friendly, and many other good properties as well :> Thank your Master.
@nkindiafund
@nkindiafund 3 жыл бұрын
Great video. Does the let i=0 in the for loop create a variable in the local memory of the high-order function? Thx
@eslpedro
@eslpedro Жыл бұрын
Thanks for the great explanation about this advanced topics!! Like others said, THIS IS THE BEST VIDEO ABOUT IT IN THE INTERNET!
@Codesmith
@Codesmith Жыл бұрын
Thank you, Pedro! We are so happy it was helpful for you!
@havefun5519
@havefun5519 7 ай бұрын
Cool tut, one step by step guide me from easy to hard.
@maremeaxi3344
@maremeaxi3344 5 жыл бұрын
wow it's the core logic of programing !!!
@Chris-qg6kc
@Chris-qg6kc 3 жыл бұрын
13:53 is excellent tactic because it cause everyone to engage vs asking students to raise their hand if they were lost which some may be hesitant to do as it may only be them with a hand up.
@codellyson
@codellyson 2 жыл бұрын
My favorite teacher.
@yarvik
@yarvik 4 жыл бұрын
Very good delivery style, delivery structure and, what's the most important to my high maintenance brain, justification for things to exist. Once I know why the hell do I need a higher order function, my brain allows this information to enter its memory store. If your brain is a demanding petulant little prince such as mine, then get your favourite beverage and binge through Will's learning material. After this talk, your brain will no longer have an excuse to reject the information about higher order functions to be stored in it,- it will be persuaded that the above-mentioned information is worth the molecular re-configuration around your synaptic nodes.
@pannihto7588
@pannihto7588 4 жыл бұрын
Нихуя ты загнул, братан
@pulok9909
@pulok9909 4 жыл бұрын
you are absolutely correct
@Emily-gr4nw
@Emily-gr4nw 3 жыл бұрын
so good! and you sound like derren brown! amazing
@vladimirstarcevic4870
@vladimirstarcevic4870 Жыл бұрын
Thanks Thanks Thanks and one more Thanks, this is great, that's help me a lot!!! 👍👍
@lfhbrownify
@lfhbrownify 2 жыл бұрын
Oh man this is what I needed
@Codesmith
@Codesmith 2 жыл бұрын
Thank you!
@eugeniogarciamason7084
@eugeniogarciamason7084 2 жыл бұрын
This was awesome
@tarek_maza
@tarek_maza 2 жыл бұрын
This video just gave me the AHA! moment. Thank you Will!
@Codesmith
@Codesmith 2 жыл бұрын
Glad it was useful Tarek 🙏
@mattwaala
@mattwaala 3 жыл бұрын
great pedagogy bro
@nouralsatari6424
@nouralsatari6424 2 жыл бұрын
thank you for existing
@Codesmith
@Codesmith 2 жыл бұрын
Thank *you* for watching Nour!
@what-do-you-feel
@what-do-you-feel Жыл бұрын
So, so, so good!
@Codesmith
@Codesmith Жыл бұрын
Thank you Konstantin! Let us all know what new topics you want covered if you get a chance
@abhigullapalli9136
@abhigullapalli9136 2 жыл бұрын
"i can tell you a funny story..." (glances at camera) "which i will not tell on video, about the confusion that zero and nought can cause" haha i definitely wanna hear this! and thx for the excellent lecture
@Codesmith
@Codesmith 2 жыл бұрын
What a story it is!
@novanoskillz4151
@novanoskillz4151 3 жыл бұрын
can you come to america and teach.. that was amazing.. do you have a javascript course. i would definitely buy... you know how to teach and breakdown and explain in laymans terms.
@divjay6403
@divjay6403 2 жыл бұрын
You are the besttt! Please teach us about the formidable “this” keyword 😲
@Codesmith
@Codesmith 2 жыл бұрын
There's one on how this works - search OOP javascript the hard parts I think
@divjay6403
@divjay6403 2 жыл бұрын
@@Codesmith thank you!
@cameroncarter6789
@cameroncarter6789 7 ай бұрын
Like with most things worthy of learning I find it interesting that intuitive things like arbitrage or "higher order functions" have nice English words to describe something that should occur inherently....
@BabyYoda5555
@BabyYoda5555 3 жыл бұрын
for the example at 25 minutes what if we don't want to multiply by 2? What if we want to multiply by a user defined number? How would we make this function more dynamic without changing the structure?
@ARandomPerson--
@ARandomPerson-- 2 жыл бұрын
The function that gets taken in(iside the parentheses)is the "call back" An outer function that takes in other functions(callbacks) is a higher order function.
@fardousahmed3883
@fardousahmed3883 4 жыл бұрын
Summary of the full video will be found at csx.codesmith.io/units/callbacks/intro-callbacks-read Thanks for this informative video.
@tauhidxahmed
@tauhidxahmed 4 жыл бұрын
Love from Bangladesh
@noimotalabi4297
@noimotalabi4297 3 ай бұрын
awesome
@asweeney101
@asweeney101 3 жыл бұрын
do for loops open a new execution context in the same way as functions do? When I tested it, the value of i was not accesible after the for loop.
@imagineabout4153
@imagineabout4153 2 жыл бұрын
I think that for-loops do not create another execution context. They are executed inside the workspace of the execution context in which they are present. I may be wrong, if so please correct me.
@imagineabout4153
@imagineabout4153 2 жыл бұрын
I now need to know about the funny story 16:54
@praveens9233
@praveens9233 9 ай бұрын
Why not push() not stacked on call stack?
@womilojuoluwatobi1015
@womilojuoluwatobi1015 Жыл бұрын
Jes!! Where have you been?
@illiamaksymov5673
@illiamaksymov5673 5 жыл бұрын
Does for loop create a new execution context?
@alanhunt3772
@alanhunt3772 4 жыл бұрын
I would say yes because the scope of variables declared within a loop are exclusive to its context. The loop has access to the outer context, but the outer context cannot access the inner context.
@JD-kf2ki
@JD-kf2ki 4 жыл бұрын
How can you run a For Loop on an 'undefined array' ( Line 3)???
@Khatastrov
@Khatastrov 3 жыл бұрын
Anyone feel free to correct if i'm wrong here... But on line 3, array is not 'undefined', so far as it's only the argument passed to the copyArrayAndMultiplyBy2() function, it's a placeholder as he said before, the parameter, whatever you call it. But when the function copyArrayAndMultiplyBy2() is called, therefore on line 8, its argument is myArray, which is not undefined, as it equals [1, 2, 3] (it was previously declared on line 7)... Wish it helps a bit ! ;-)
@filippians413
@filippians413 3 жыл бұрын
I'm here so that I can figure out how to solve a codewars challenge
@amanrathi
@amanrathi 4 жыл бұрын
Gold
@DDoesT
@DDoesT 4 жыл бұрын
I want to know the not point five story.
@tupperck
@tupperck Жыл бұрын
So what's the story about "nought" .5?
@warrenwong4518
@warrenwong4518 3 жыл бұрын
It finally clicked.
@jasonvictor1798
@jasonvictor1798 4 жыл бұрын
Can someone explain why the function 'multiplyby2' was renamed as instructions?
@NickHope
@NickHope 2 жыл бұрын
It wasn't renamed as 'instructions'. 'instructions' is the 2nd parameter of the copyArrayAndManipulate function. You can think of it as a placeholder that will be replaced by the 2nd argument that is passed when the copyArrayAndManipulate function is called/invoked/run. In the example at 30:00 he is passing multiplyBy2 as the 2nd argument, so the code of the multiplyBy2 function ITSELF gets passed into the copyArrayAndManipulate function. But he could just as easily have run let result = copyArrayAndManipulate([1, 2, 3]), divideBy2); which would make 'instructions' get replaced by a divideBy2 function (if it existed) as the 2nd argument to the copyArrayAndManipulate function. He could end up with 20 little functions that do different things, such as subtract2, MultiplyByPi etc. and pass any of those into copyArrayAndManipulate. Also important is that the word 'instructions' (which could be any word), as the 2nd parameter of the copyArrayAndManipulate function, matches the word 'instructions' in the body of the function, so the browser knows where to put and run the code of the passed-in function (e.g. multiplyBy2).
@abhisheksrivastava1208
@abhisheksrivastava1208 3 жыл бұрын
how do I ask him to teach JS in India?
@MadAustinite
@MadAustinite 3 жыл бұрын
Who else clicked on this video because it looked as if he was wearing a prison jumpsuit in the thumbnail. Teaching JS in prison?
@paranoidfrandroid
@paranoidfrandroid Жыл бұрын
if you don't return result at the end, does the function still run?
@Codesmith
@Codesmith Жыл бұрын
It would still run - but there'd be no output - it was just be held inside the execution context and when the function exits (it inserts a return automatically if you don't add one) everything inside the execution context's local memory would be deleted!
@paranoidfrandroid
@paranoidfrandroid Жыл бұрын
@@Codesmith ok thank you for the quick response.
@SuperNZY
@SuperNZY 2 жыл бұрын
I want to be adopted by Will Sentance.
@Jurecki07
@Jurecki07 5 жыл бұрын
Why didnt you declare your myArray varaible before your function?
@joshuablauvelt9662
@joshuablauvelt9662 5 жыл бұрын
You always declare your variable before you make a reference to them. The function definition itself doesn't use the variable; the variable is passed to the function as an argument when the function is invoked. The invocation is after the variable is declared. You *could* declare the variable before the function and these code examples would still work, but it's a good practice to declare all your functions first so a) they're all in one spot, and b) someone reading your code can glance through you and see all the functions that can/may be used in your program.
@pritambhattacharya9902
@pritambhattacharya9902 4 жыл бұрын
this guy never asked to liked his video. wow!
@Codesmith
@Codesmith 3 жыл бұрын
😂
@view1989
@view1989 2 жыл бұрын
i want to hear that story....
@Codesmith
@Codesmith 2 жыл бұрын
😂
@alanhunt3772
@alanhunt3772 4 жыл бұрын
Will: "We are going to walk through this function so that we can feel the pain and understand why there's a better way!" me: No we're not, *skips ahead*
@k0secha
@k0secha 10 ай бұрын
Amazing instructor. Is it only cis dudes in this class? LOL
JavaScript the Hard Parts: Closure, Scope & Execution Context
1:56:56
Useful Gadget for Smart Parents 🌟
00:29
Meow-some! Reacts
Рет қаралды 10 МЛН
ISSEI funny story😂😂😂Strange World | Magic Lips💋
00:36
ISSEI / いっせい
Рет қаралды 121 МЛН
Мы играли всей семьей
00:27
Даша Боровик
Рет қаралды 4,2 МЛН
How To Choose Ramen Date Night 🍜
00:58
Jojo Sim
Рет қаралды 51 МЛН
JavaScript the Hard Parts: Closure, Scope & Execution Context
57:05
Higher Order Functions - JavaScript Tutorial
10:10
ColorCode
Рет қаралды 58 М.
Higher Order Functions in JavaScript Explained Simply
9:55
Teddy Smith
Рет қаралды 6 М.
JavaScript the Hard Parts: Callbacks & Higher Order Functions
1:21:53
JavaScript the Hard Parts: Closures, Scope, and Execution Context
1:54:12
Every JavaScript Developer Has Made This Mistake With Functions
7:17
Web Dev Simplified
Рет қаралды 103 М.
Understanding JavaScript Callbacks
15:39
All Things JavaScript, LLC
Рет қаралды 114 М.
What are Higher-Order Functions in JavaScript? | Learn Higher-Order Functions using Examples
22:50
5 JavaScript Concepts You HAVE TO KNOW
9:38
James Q Quick
Рет қаралды 1,4 МЛН
How about that uh?😎 #sneakers #airpods
0:13
Side Sphere
Рет қаралды 9 МЛН
Google I/O 2024 - ИИ, Android 15 и новые Google Glass
22:47
M4 iPad Pro Impressions: Well This is Awkward
12:51
Marques Brownlee
Рет қаралды 6 МЛН
Главная проблема iPad Pro M4 OLED!
13:04
THE ROCO
Рет қаралды 49 М.
Готовый миниПК от Intel (но от китайцев)
36:25
Ремонтяш
Рет қаралды 297 М.