"I reduced myself to talk about reduce()" 10/10 teacher.
@CameronChardukian
5 жыл бұрын
Hahaha
@thaitranxuan597
4 жыл бұрын
i touch my lit- sis like that ..now i pain too.
@clevermissfox
9 ай бұрын
He’s the best! So endearing! His enthusiasm is contagious
@volfegan
6 жыл бұрын
1st time I actually understood reduce(). I always used the for loops to find min or max of something, but a new world opens.
@jordyleffers9244
4 жыл бұрын
Yup, I'm going to be busy rewriting lots of stuff!
@aslahphussain
3 жыл бұрын
what's best about his way of teaching is that he's learning with us!
@h2oarindam789
3 жыл бұрын
this guy is sooooo freaking awesome....I can't imagine myself confused after watching any of his videos no matter how difficult the topic is. Hoping you expand content to cover even more concepts and languages. best of luck!!
@climbers1376
6 жыл бұрын
Arrays: 0:47-1:18 coding traditional summation function 1:55-6:06 how reduce function works 6:06-7:13 reducing code (ES6) 7:29-9:28 coding traditional max function 9:28-12:50 reducing code... 10:02-11:40 ... further with ternary operator 13:04-13:49 reduce's "assumed initial value"
@vinubox
4 жыл бұрын
People with deep knowledge will explain things as simple as possible, you are an example
@grants5036
3 жыл бұрын
This dude is out of breath he is so hype. Love it! I understand you perfectly where I couldn't elsewhere.
@milkdrom3da
2 жыл бұрын
This has been an amazing experience . I love how you broke everything down, i was so confident with the syntax at first but seeing you wait the function first and then break it down and put it into the reduce parameter really helped. Thank you so much for this video-!!!!!!
@tobyeglesfield4403
2 күн бұрын
Great explanation - I've been slowly getting my head around this and this just completes a bit more of that picture up there. I like how you're expressing concern over readability, and then testing and explaining as you go. Great stuff as always.
@346ask
4 жыл бұрын
You explained this so well, I was trying to wrap my head around it reading the documentation and couldn't understand it. I almost gave up completely. Thank you so much.
@Matt-tn2on
Жыл бұрын
Everyone one of this guys videos is therapeutic on a level that’s hard to describe. Pure love…
@emmythepixi
5 жыл бұрын
Goddamn, I'm so glad I found your channel! I was so freaking confused about arrow function ternary operator syntax and you explained it in a way that was so easy to understand.
@you_gotit_bud
6 жыл бұрын
Thank you for doing what you do. As someone who is switching careers and trying to get into school, I felt genuinely lost until I stumbled upon The Coding Train. I'm all aboard buddy, keep chugging.
@sadhlife
6 жыл бұрын
I can't stop laughing at the intro XD
@dappermink
6 жыл бұрын
Tushar Sadhwani HELLO I'M TINY
@Medi0cr3-
3 жыл бұрын
these are great videos. you're goofy as all can be, but the way you make errors and then go through why the error is there and you explain the error and also explain the fix. This helps me out so much. good work
@selfmadetool
4 жыл бұрын
Thank you, man! The internet has changed the way programmers learn!
@basselturky4027
Жыл бұрын
I never seen better explanation for reduce function. Thank you so much.
@matthewblasco4720
2 жыл бұрын
THANK GODDDDDDD!! I WAS RACKING THE WRITTEN DOCUMENTATIONS WITH NO RESULT FOR 5 HOURS!!! AND YOU ANSWERED ME FOR 14 MINS!!
@XpLoeRe
3 жыл бұрын
.Reduce() gives you the ability to iterate over the array while keeping track of current index and previous index. thank you!
@jeremyrubio1531
2 жыл бұрын
12:32 is really awesome. Great explanation, thanks for sharing your knowledge and it's funny to think that you're learning with us but you can make an app in 15 mins lol.
@richardramos7267
6 жыл бұрын
The only video of yours that I grasp, I'm improving maybe ?.. Your other video is too advance for me, I want to be like you.. You are such a genius.
@RameenFallschirmjager
4 жыл бұрын
Daniel, the crazy uncle that everyone needs!
@--Dipanshu--
3 жыл бұрын
He is truly a dedicated and passionate teacher
@80Vikram
5 жыл бұрын
Thanks to youtube and people like you; anyone across globe is getting best quality knowledge absolutely free of cost.
@emreibrahim8504
2 жыл бұрын
Great explanation. Its the hardest built in function anyway because it can be used in various problems
@alexhaid626
5 жыл бұрын
Thank you so much! Finally, I got what reduce function is all about and how it works!
@abubalo
2 жыл бұрын
Smoothest intro I have ever seen.
@SungjinHa
3 жыл бұрын
Found my new favorite code explainer. Thinks the way I think when I'm trying to figure stuff out.
@ritchieharrison8808
4 жыл бұрын
thank you so much man!!! I was looking for the logic explanation at 12:36 for the past 4 hours but nobody could make it clear as you did. Now it's clear as a day.Thanks again!!! Take care!!!
@ytdevs
2 жыл бұрын
Thank you! 🙏💕, it took me years to understand this until I watched your video
@BlockCylinder
3 жыл бұрын
It's clicking for me today. Thank you for all of your videos.
@jacquelingonza9685
3 жыл бұрын
I was close to give up finally light at the end of the tunnel. Thank you
@agusisas5742
3 жыл бұрын
Far way the best teaching videos I ever seen! You explain in such funny way!! I love your videos
@collinkreutzer8414
6 жыл бұрын
Reminds me of the c++ stl library algorithms using lambda expressions. Really nice way to write compact and fast code. Great to see it coming to JS as well.
@rolfnoduk
6 жыл бұрын
Collin Kreutzer it's not new fyi
@mathematicalmatt
6 жыл бұрын
You got that backwards. C++ was one of the last languages to use functional ideas.
@seancpp
4 жыл бұрын
Matthew Hoiland C++11 released lambdas. ES2015 released arrow functions You’re wrong pal
@celina6204
3 жыл бұрын
I love how you're learning with us! You always say exactly what I'm thinking
@IvanTomljenovic
6 жыл бұрын
I find your tutorials the easiest to follow while learning Js. You should definitely start a podcast!
@kieran2347
3 жыл бұрын
This is the first ever video I've come across that explains the exact concept and how it works, step by step, oh man why didnt I find you and this video much sooner, I'm subscribed lol. In struggling with JS alot fyi and look forward to checking all your videos. Thanks man
@anthonythompson3806
2 жыл бұрын
The .reduce() method has never been this entertaining!
@gracechan3039
4 жыл бұрын
I'm actually watching this for entertainment in my off time. I saw your code, which is an improvement on my terrible code in this game Im coding for a hobby. I replace my terrible code with your code and my game is nicer. Amazing. I feel like I was just watching a bakery show and copy pasted myself a doughnut if that even makes sense.
@charmainetabilas3132
5 жыл бұрын
This was super helpful and I think you did a great job explaining it! It made the MDN documentation make sense.
@Keirathi
6 жыл бұрын
Using 'a' and 'b' for your variable names makes it seem way more confusing than it really is. If you use something logical like 'max' and 'currentVal' it makes a lot more sense: vals.reduce((max, currentVal) => currentVal > max ? currentVal : max);
@Keirathi
6 жыл бұрын
No, of course you don't NEED to. But if you're looking at unfamiliar code, you can generally pick up what's happening quicker if variables are named sensibly. And especially if you are having trouble running through it in your head when you're WRITING it as "a,b", then if you just give them more appropriate names it can be easier to picture what's supposed to be happening.
@Keirathi
6 жыл бұрын
Public libraries? No. I'm just a little ol' developer at a medium tech company. I'm not sure how that's relevant at all, though. At my job, that code wouldn't get past code review. But again, it's irrelevant. The point is that when you're teaching a new concept to someone and the concept can/is kind of confusing, it's just generally more helpful to have things named in a useful way. Yes, 'a,b' is fine. But as a demonstration tool, it can get confusing. As you can see in this video where even HE got confused. In this exact example, it didn't matter, but that could have been a bug that would cause problems later in another scenario.
@Keirathi
6 жыл бұрын
Right, that's the part I was talking about. He actually notices a little bit later that he has the "a > b" part backwards and it should be "b > a", but it didn't matter in this specific example. In another example, it might have mattered. And with more descriptive variable names, the mistake wouldn't have been made in the first place!
@TheCodingTrain
6 жыл бұрын
Thanks for this comment, it's an excellent point!
@pschichtel
6 жыл бұрын
This function is so simple, the names do not matter at all. If you really wanted to improve this, name the function, e.g. reduce(Math.max)
@Nonsense116
6 жыл бұрын
This seems to be the best explanation I've found so far. Thank you!
@genovo
4 жыл бұрын
trying to wrap my head around following when i saw your video, thanks it helped: const pipeline = (...fns) => (value) => fns.reduce((acc, fn) => fn(acc), value) const celsiusMult = (number) => number * 9/5 const celsiusAdd = (number) => number + 32 const fahrenheit = pipeline(celsiusMult, celsiusAdd) fahrenheit(100) // 212
@linahmuhonja4128
2 жыл бұрын
Nice tutorial I am so confident about the then jargon reduce () method.
@vivekraj9875
5 жыл бұрын
I love the way of your teaching👌👌,,Best Teacher🏆
@alandemir568
3 жыл бұрын
I really liked this video, already watched it a few times all the way through. Thanks for the great explanations, it's great how you show your train of thought and all the steps. Your level of crazy is much appreciated also.
@md.abdullahalmasum4942
3 жыл бұрын
this is the best technique for teaching students.
@sol3cito33
3 жыл бұрын
Thank you so much for this one! I was struggling with reduce() until now but not anymore!
@dr__ey
Жыл бұрын
thanks so much for all these videos on array methods!!!! helps make them make sense
@asaadmahmood7674
5 жыл бұрын
Just started watching your videos yesterday, have developed into a really big fan!
@ericrovell1970
6 жыл бұрын
The best intro I have even seen in my life🤣
@liamoswald6429
5 жыл бұрын
first time I've seen the outro and it made me smile so much!
@theuseraccountname
2 жыл бұрын
I played around a bit and this is what I made: _array.reduce((acc, val) => Math.min(acc, val)) _array.reduce((acc, val) => Math.max(acc, val))
@maheshjamdade1
5 жыл бұрын
best part of the video at 6:15 the way you broke the function
@MichaelMcCrae
3 жыл бұрын
"I could probably use this thing called a ternary operator if I was a crazy person."
@haciendadad
5 жыл бұрын
I was trying to see the difference between your reducer example and just using a map function, but I guess that is where the accumulator comes in. The accumulator persist over all the iterations where in a map function, you would have to create a variable outside the function and in each iteration of the map function you could do math on that variable and change it accordingly but the reducer function provides that extra variable and allows you to use on each iteration. Nice. Thanks!!
@ga7853
5 жыл бұрын
I really really like your video, thank you so much for the efforts you had put in this video to make it so clear.
@hyp3ri0nn
4 жыл бұрын
This was the best video about reduce method ever
@ElderESG
3 жыл бұрын
One of the best, if not the best out there. Thank you
@drip3889
3 жыл бұрын
this guy explained it to me better than codecademy
@Sun1ive
6 жыл бұрын
the best video so far that i saw about reduce. thanks
@faribadadko5694
3 жыл бұрын
Great explanation! it STICKS now! Thank you!
@Wastefuldragon
4 жыл бұрын
Best coding teacher ever
@MrZelnoth
6 жыл бұрын
Should probably also have mentioned that reduce is what you want to use if you ca't find another function that does what you are trying to do. Reduce is a lot more flexible than the other array functions.
@musa6173
2 жыл бұрын
what are you?!?!?! some kinda magician?! that was so damn good. you explained it so well, man. thanks.
@sanukumar306
3 жыл бұрын
Best explanation technique ever seen 👍🏻
@Amal-qo6kx
4 жыл бұрын
it was challenging for me to understand reduce() you are my favorite teacher ever :D I enjoyed your video and I actually learned, thanks man
@АндрейМаксименя
Жыл бұрын
Really love your videos. Thank you so much. But what I lacked here, first time watching it, was how reduce works with other type of data. For example string. Would be helpful to see those examples.
@salinajohn370
3 жыл бұрын
I just LOOVE his introduction😆
@GokulRG
5 жыл бұрын
Man, thanks for this! No book explains this properly!! Guess I jumped on the coding train by subscribing :)
@icysnake1989
4 жыл бұрын
Thanks for help understand reduce() function
@starlessnight1164
3 жыл бұрын
This looks like a really promising channel to learn, thank you.
@carlosjunod5424
4 жыл бұрын
fist video of this channel I've ever seen (already subscribed)... for a brief moment I thought it was jeff Goldblum teaching coding! lol.. awesome video, I love the energy
@frankkj1995
3 жыл бұрын
An important quirk to point out is that if no starting accumulator is given, the value parameter will start at the second index of the array as the accumulator already holds the first value, however if the accumulator is defined then the value will start at the first element, even if the accumulator and the value are the same.
@nitishgupta8393
4 жыл бұрын
My goodness. How easily i got this reduce concept in my mind
@thedotisblack
6 жыл бұрын
Great videos again! Although, would like to see some simple case applications in art and/or design... Perhaps based on or reproducing some early computer art.
@nostalgicnow6001
Жыл бұрын
you literally did useState() from react. before react did it lol your truly amazing!
@noa_430
4 жыл бұрын
I love this. You're really entertaining and I'm learning so much!!!!
@ebonitasha
2 жыл бұрын
they way he teach, have me excited as well
@TheCodingTrain
2 жыл бұрын
I'm so glad to hear!
@dumi9838
5 жыл бұрын
You are a GOD! I can finally say I got my head wrapped around the reduce function. Subscribed with bells and all, thank you !!!
@80Vikram
5 жыл бұрын
summation using reduce < pre 7:33 post > find max using reduce
@Person-hb3dv
2 жыл бұрын
you are a great teacher sir
@Clonez-sr7to
2 жыл бұрын
I think writing Code that's easy to understand is more important than writing code as fast as humanly possible. Cool video though, I agree that's a bit more confusing.
@jacintomichaelpalaroan5615
6 жыл бұрын
Your video helped me understand reduce. thanks a lot!
@nate9550
5 жыл бұрын
Glad I found your channel, really nice and helpful video! :D
@sydneymadope
3 жыл бұрын
Unmatched energy! 👏🏾
@Dr_Ali.Aljboury
6 жыл бұрын
Wow you amazing man and your explanation have many ways to give idea for one time. I do appreciate your video I will watching all your video from now because my work depends on this videos....😘❤😘
@dappermink
6 жыл бұрын
Haha I can tell that even though you try hard to adopt the new syntaxes you prefer the long but clear and explicit ways ^^ Personally I have mixed feelings, these new syntaxes feel like some tiny tricky puzzles, and even unclear it is very fun to read codes written this way. I often prioritize the simplicity but here in this special case I really enjoy the fun side :)
@tonysmarks3578
5 жыл бұрын
Learn more deeper than I ever know.
@ddprasad9952
4 жыл бұрын
You're an amazing teacher 👏😃😃
@MrWardo2009
3 жыл бұрын
Thanks for making this video!
@timeowilliams4620
3 жыл бұрын
Outstanding job and explanation!
@joshrandall3663
4 жыл бұрын
What a solid explanation. Thank you! Love your videos :D!
@king-manu2758
4 жыл бұрын
I've seen people using reduce in a super complex way and I haven't found any video going beyond the usage with simple arrays. I wish someone explained me how it's used beyond manipulating simple arrays.
@bendanielspercussion
2 жыл бұрын
I love you, Dan! You're the best!
@thesmartest1919
3 жыл бұрын
thank you so much , u made it so easy to understand
@vitorguimaraes9101
3 жыл бұрын
Great video, thanks for sharing! It helped me a lot!!
@AugusDogus
6 жыл бұрын
The Elvis operator strikes again!
@InayetHadi
5 жыл бұрын
Excellent explanation!
@phutureproof
6 жыл бұрын
I come from a background of PHP and have used pre es5 (no idea what to call it) javascript, getting into the newer functions and syntax available in newer js is great but confusing.... I love the terse syntax, I come back the day after and I cannot understand what did previously, I guess time will help but man I'm struggling with reading back arrow functions
Пікірлер: 277