JavaScript Higher Order Functions & Arrays

  Рет қаралды 973,677

Traversy Media

Traversy Media

6 жыл бұрын

In this video we will look at some of the very powerful higher order functions and working with arrays. We will look at forEach, map, filter, reduce and sort.
SPONSOR:
www.bugreplay.com
MODERN JAVASCRIPT FROM THE BEGINNING ($10 PROMO):
www.udemy.com/modern-javascri...
CODE: JSFiddle
jsfiddle.net/bradtraversy/e5r...
💖 BECOME A PATRON: Show support & get perks!
/ traversymedia
VISIT MY WEBISTE: Check Out My Udemy Courses
www.traversymedia.com
FOLLOW TRAVERSY MEDIA:
/ traversymedia
/ traversymedia
/ traversymedia
/ discord

Пікірлер: 1 100
@OmarBugarin
@OmarBugarin 6 жыл бұрын
I just recieve my first pay working like a front-end dev, and i buy your course, becouse i need to be better with js and becouse thanks to you i got my job, thanks man youre the best teacher, if one day you come to México, youre welcome in my house!
@caioferreira3308
@caioferreira3308 5 жыл бұрын
Really, nice man congrats, i wanna a job as a full stack and i will get by brad classes
@nrg7685
@nrg7685 5 жыл бұрын
@stillFLiP i just wanted to ask the same. Because in my country we have requirements like 5years work as a developer. Thats insane
@PaulBrownclk-me
@PaulBrownclk-me 5 жыл бұрын
Tamás Mirják just build loads of stuff, even small spas and single webpages that show you understand a certain concept, this will help your job prospects..
@raboija
@raboija 4 жыл бұрын
that's nice
@unknownman1
@unknownman1 4 жыл бұрын
what is your salary ?
@sonnyps413
@sonnyps413 4 жыл бұрын
Timestamps - ForEach() - 3:25 - 5:30 Filter() - 5:30 - 15:30 (8:55 One liner filter code) (filter will returns an array - meaning you do not need a separate variable for an array) Map() - 15:45 - 21:05 (20:30 You can link multiple Map() like .then() from promises) Sort() - 21:10 - 25:50 (Takes two params) Reduce() - 25:50 - 30:55 (Reduces the array to a single value - from LEFT to RIGHT) Extra : 31:05 - 33:40 (Combine all four methods)
@curiosdevcookie
@curiosdevcookie 4 жыл бұрын
Thank you,
@JD-kf2ki
@JD-kf2ki 4 жыл бұрын
thanks, dude
@simple8810
@simple8810 2 жыл бұрын
@afreen khanum Nah, forEach loop over an array, and it only gives us values when we defined specific conditions for that, e.g ages.forEach(function(age) { if(age>30){ console.log(age) } }); so it only gives value which pass the condition but in filter ,it will make array of these values which pass the conition and for each doesnot return anything while filter return a new array depend on the condition
@user-zv6ce1ss2j
@user-zv6ce1ss2j 2 жыл бұрын
Appreciate it
@HariramNandagopal
@HariramNandagopal 6 жыл бұрын
RIght now I have reached a level where searching for a video within "Traversy Media" channel seems to be more bliss than searching whole KZbin. Top class Brad :)
@TraversyMedia
@TraversyMedia 6 жыл бұрын
Thanks :)
@Nemcoification
@Nemcoification 6 жыл бұрын
Lol, same here. My preferred google search on a topic is now "Traversy (topic)". That says a lot :)
@ChristofferHald
@ChristofferHald 5 жыл бұрын
@@Nemcoification Funny to read this comment. I have done exactly this the last two weeks.
@devonrusinek5807
@devonrusinek5807 5 жыл бұрын
@@Nemcoification Same here
@curiosdevcookie
@curiosdevcookie 4 жыл бұрын
Well put, same here!
@boristheblad
@boristheblad Жыл бұрын
Those "Now put it on pause and try to do it yourself" are gems in your videos man, really helps to learn!
@ousmanebocoum221
@ousmanebocoum221 6 жыл бұрын
Actually understanding those basics should be what people focus on, instead of learning frameWorks and libraries without knowing what is going on under the hood..once again thanks, Brad!!!
@TraversyMedia
@TraversyMedia 6 жыл бұрын
agreed
@ubozoharinze8869
@ubozoharinze8869 2 жыл бұрын
I am being forced to learn angular in my new company but a friend told me to move to basic ts and js which i can say is really helping me out blindly learn frameworks is bad
@kennitapombar-munet342
@kennitapombar-munet342 Жыл бұрын
NYPD.live.streaming.scanning.on.911.1-929-221-7560.911.FDNY.com NYPD.live.streaming.scanning.on.911.1-929-221-7560.911.FDNY.com Automatic.coding.live.streaming.scanning.on.javascript.python.html5.web.app.api.deploy.1-646-386-3600.com Automatic.coding.live.streaming.scanning.on.javascript.python.html5.web.app.api.deploy.1-646-386-3600.com NYPD.live.streaming.scanning.on.911.1-929-221-7560.911.FDNY.com Automatic.coding.live.streaming.scanning.on.javascript.python.html5.web.app.api.deploy.1-646-386-3600.com Automatic.coding.live.streaming.scanning.on.javascript.python.html5.web.app.api.deploy.1-646-386-3600.com NYPD.live.streaming.scanning.on.911.1-929-221-7560.911.FDNY.com Automatic.coding.live.streaming.scanning.on.javascript.python.html5.web.app.api.deploy.1-646-386-3600.com NYPD.live.streaming.scanning.on.911.1-929-221-7560.911.FDNY.com Automatic.coding.live.streaming.scanning.on.javascript.python.html5.web.app.api.deploy.1-646-386-3600.com Automatic.coding.live.streaming.scanning.on.javascript.python.html5.web.app.api.deploy.1-646-386-3600.com NYPD.live.streaming.scanning.on.911.1-929-221-7560.911.FDNY.com Automatic.coding.live.streaming.scanning.on.javascript.python.html5.web.app.api.deploy.1-646-386-3600.com Automatic.coding.live.streaming.scanning.on.javascript.python.html5.web.app.api.deploy.1-646-386-3600.com NYPD.live.streaming.scanning.on.911.1-929-221-7560.911.FDNY.com Automatic.coding.live.streaming.scanning.on.javascript.python.html5.web.app.api.deploy.1-646-386-3600.com Automatic.coding.live.streaming.scanning.on.javascript.python.html5.web.app.api.deploy.1-646-386-3600.com NYPD.live.streaming.scanning.on.911.1-929-221-7560.911.FDNY.com Automatic.coding.live.streaming.scanning.on.javascript.python.html5.web.app.api.deploy.1-646-386-3600.com Automatic.coding.live.streaming.scanning.on.javascript.python.html5.web.app.api.deploy.1-646-386-3600.com NewYorkCityPoliceDepartment.live.streaming.scanning.on.911.1-917-224-9256.911.e-file.SupremeCourt.of.NYC.1-646-386-3600.com NewYorkCityPoliceDepartment.live.streaming.scanning.on.911.1-917-224-9256.911.e-file.SupremeCourt.of.NYC.1-646-386-3600.com NewYorkCityPoliceDepartment.911.1-917-364-4637.911.1-646-386-3600.911.FDNY.com NewYorkCityPoliceDepartment.911.1-917-364-4637.911.1-646-386-3600.911.FDNY.com NewYorkCityPoliceDepartment.live.streaming.scanning.on.911.1-346-492-0536.911.e-file.SupremeCourt.1-646-386-3600.com NewYorkCityPoliceDepartment.live.streaming.scanning.on.911.1-346-492-0536.911.e-file.SupremeCourt.1-646-386-3600.com CoronaVirus.critical.outbreak.live.streaming.scanning.on.com CoronaVirus.critical.outbreak.live.streaming.scanning.on.com NewYorkCityPoliceDepartment.live.streaming.scanning.on.911.1-833-417-2274.911.1-646-386-3600.911.FDNY.com NewYorkCityPoliceDepartment.live.streaming.scanning.on.911.1-833-417-2274.911.1-646-386-3600.911.FDNY.com AlexisRodriguez.live.streaming.scanning.on.911.1-646-386-3600.e-file.1-202-456-1111.com AlexisRodriguez.live.streaming.scanning.on.911.1-646-386-3600.e-file.1-202-456-1111.com NYPD.live.streaming.scanning.on.911.1-929-221-7560.911.FDNY.com NYPD.live.streaming.scanning.on.911.1-929-221-7560.911.FDNY.com Automatic.coding.live.streaming.scanning.on.javascript.python.html5.web.app.api.deploy.1-646-386-3600.com Automatic.coding.live.streaming.scanning.on.javascript.python.html5.web.app.api.deploy.1-646-386-3600.com NYPD.live.streaming.scanning.on.911.1-929-221-7560.911.FDNY.com Automatic.coding.live.streaming.scanning.on.javascript.python.html5.web.app.api.deploy.1-646-386-3600.com Automatic.coding.live.streaming.scanning.on.javascript.python.html5.web.app.api.deploy.1-646-386-3600.com NYPD.live.streaming.scanning.on.911.1-929-221-7560.911.FDNY.com Automatic.coding.live.streaming.scanning.on.javascript.python.html5.web.app.api.deploy.1-646-386-3600.com Automatic.coding.live.streaming.scanning.on.javascript.python.html5.web.app.api.deploy.1-646-386-3600.com FDNY.LIVE.STREAMING.SCANNING.ON.COM
@ITSH4WK
@ITSH4WK 6 жыл бұрын
Great examples. I love how you break things down and then show simpler ways of getting the same results. Really helpful. Thanks, Brad
@zachaluza3410
@zachaluza3410 4 жыл бұрын
I've been struggling with these functions for a while, and this video really helped!
@davidvideauortega287
@davidvideauortega287 6 жыл бұрын
Your tutorials are out of this world. You explain every single thing, what makes them really easy to follow and begginer-friendly. I can't thank you enough for that! I'm a huuuuuge fan of your work :)
@thevoiceofgod7454
@thevoiceofgod7454 5 жыл бұрын
Thanks For the great tutorials, they are so helpful, I had my first developer job interview, needless to say, I don't think I'll get the job, but what I have learned through practice and watching your tutorials was tremendously helpful during the interview process. First code test I passed easily, second code test was much more difficult and I couldn't figure out the code but I was able to figure out parts of it. Seriously thanks for the tutorials. For those of you out there just starting out, looking for your first developer jobs, the JS test I was given consisted of an easy first test, basically just asking basic questions about identifying operators, for loops, switch statements, what are objects stuff like that. The second test was to write a function where I had to figure out how to find words in a given sentence/string that contain a specific character and output those words that start with that character and then reverse the words. Didn't do so well on the second test.
@troytempest3023
@troytempest3023 Жыл бұрын
Brad, honestly speaking you're by far the best source of not only quality and useful programming info but your explanations and comprehension of these concepts and their application is really great and very easy to understand. Thanks for the amazing content!
@sarahrudy8292
@sarahrudy8292 2 жыл бұрын
You are SUCH a great teacher! I found you through your course Modern JavaScript from the Beginning and these youtube videos are just the icing on the cake. Thanks so much for spreading your knowledge!
@brunoqgalvao1
@brunoqgalvao1 5 жыл бұрын
Brad, congratulations on your videos, it has been helping me a lot these past few months. What you are doing here has immense value and i hope you are getting the reward for it. Trying to do my part, i have just become a patron. It's not much but hopefully soon i'll be able to give out more. Thank you very much.
@ajaybayya
@ajaybayya 6 жыл бұрын
Thank you Traversey, your content inspires a lot to make my day to day work better.
@kissromeorichard
@kissromeorichard 2 жыл бұрын
Brad, your way of explaining abstract things like functions suits well to many, many future programmers. A humble thank you! PS. And also your voice and tone is really soothing for people who want to learn.
@jasonwelsh417
@jasonwelsh417 5 жыл бұрын
I love your channel. Thank you so much for all the great content. I bought your JavaScript course and I can't wait to go through it for a refresher on some things as well as new learning!
@ivansmrcek291
@ivansmrcek291 3 жыл бұрын
Amazingly encapsulated solutions into single-liner definitions of power! Great job Brad!
@LaurenceBahiirwa
@LaurenceBahiirwa 5 жыл бұрын
Thanks Brad for this. I was preparing a lesson for my Cambridge students. This helped greatly. Keep it going man.
@davlatgulomxusenov2031
@davlatgulomxusenov2031 3 жыл бұрын
are you a teacher of Cambridge University?
@deependrarathore283
@deependrarathore283 3 жыл бұрын
I am newbie and learning coding . I have questions here , we are passing company as parameter but company is not defined anywhere ?
@vainav5794
@vainav5794 3 жыл бұрын
@@deependrarathore283 if you talking about the 10:10 time stamp here company is just a parameter just like passing paramters like x,y in a function this is possible in javascript unlike lang like c++ and etc here the values from the companies array is stored in company variable as it loops through all the object ppresent in the companies array i think this is the coorect explanation corect me if iam wrong
@ScottGrovesBrainDump
@ScottGrovesBrainDump 6 жыл бұрын
Brad, just love this video!!! Really great examples and soooooo well explained. Really like you testing us by asking us to pause and try ourselves. Makes it so interactive. Thumbs up!!!
@muhsinkhalif3621
@muhsinkhalif3621 4 жыл бұрын
Thank you for making it look so simple! God Bless you for this wonderful tutorial!
@mike220_8
@mike220_8 4 жыл бұрын
You do a really nice, clear job of explaining these concepts and breaking things down - thanks for your time creating these tutorials!
@othmane2493
@othmane2493 4 жыл бұрын
I really don't get how can ppl dislike a video of a guy who gives them some knowledge for free ... like how ??
@f12736
@f12736 2 жыл бұрын
Maybe by clicking on the dislike button. 🤔🤔
@golamrabbiazad
@golamrabbiazad 5 жыл бұрын
Thank you so much. Your explanation was amazing. lovely!
@ninopotskhoraia5373
@ninopotskhoraia5373 2 жыл бұрын
I never hear any banging or yelling which you are apologizing for in your videos. You have nothing to apologize for sir. Your content and teaching style is unmatched with. You have taught me so much. Thank you for your awesome videos.
@edhead76
@edhead76 4 жыл бұрын
Your lessons are so straight forward. Thank you for not overcomplicating simple concepts. I don't know why array functions keep messing with my head but this helps SOOO MUCH!
@argeelearner3978
@argeelearner3978 6 жыл бұрын
On your way to 300,000K, Good for you. Your the best!
@MrSuperawesomeisme
@MrSuperawesomeisme 4 жыл бұрын
Very well explained! Thank you. You must have accidentally mixed up square vs square root though!
@makidelidaki9262
@makidelidaki9262 4 жыл бұрын
I love you. I've read tutorials about higher-order functions before and never got them. Thanks so much for this. That will be a boon for my exercises on edabit. Can't believe I finally understand map,filter,sort,reduce and what they're used for + how. So helpful
@brondchux
@brondchux Жыл бұрын
4 years later - Thank you Brad for the refresher!
@EricBishard
@EricBishard 6 жыл бұрын
Really good video. I'm a 10 year JS dev and work with JS everyday and courses like this are required to simply stay sharp! Nice job..
@uwspstar2008
@uwspstar2008 6 жыл бұрын
thanks for sharing this one!
@TradeStream
@TradeStream 4 жыл бұрын
this is golden thank you. walkthrough, description, examples - so informative.
@miggu
@miggu 5 жыл бұрын
Thank you for explaining things calmly , orderly and easy to understand.... so hard to find to find people with this talent .
@captainalpha4853
@captainalpha4853 6 жыл бұрын
Hi Man , please keep doing tutorials videos , i love 'em a lot 😍😍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍
@websurfer5845
@websurfer5845 6 жыл бұрын
Man, thats one of the best videos. make some other javascript videos , its one of the most famous languages out there. So please share with us the most important things u've learn doing javascript throughout your entire programming life
@peoray
@peoray 6 жыл бұрын
Have you tried the course?
@peoray
@peoray 6 жыл бұрын
How would you rate the course?
@AoifeNic_an_t-Saoir
@AoifeNic_an_t-Saoir 6 жыл бұрын
Shatov his courses are all great, especially the ones on Javascript. He not only knows what he's talking about, but he also knows how to teach it in a way that we can understand.
@baybay1234
@baybay1234 6 жыл бұрын
yeah check out his courses on Udemy if you'd like to show some support to his great content :)
@konstantinkkk8397
@konstantinkkk8397 5 жыл бұрын
Web Surfer pls tell me how to find his tutorials on udemy
@ssk7690
@ssk7690 3 жыл бұрын
Man you've got no idea how much you help a person in need. God bless you!
@Fahdie
@Fahdie 4 жыл бұрын
Half way through your video and your tutorial is absolutely magical. THANK YOU!
@pikachu5223
@pikachu5223 6 жыл бұрын
Thank you! buy brad js udemy course is gold
@achivers8
@achivers8 6 жыл бұрын
Kali 33 hi, is it the modern JavaScript one or any other js course
@pikachu5223
@pikachu5223 6 жыл бұрын
Abdul Gafoor the modern one
@TheFallinforyou
@TheFallinforyou 6 жыл бұрын
For an even shorter way of sorting the Company starts: const sortedCompanies = companies.sort((a,b) => a.start - b.start);
@awaisfiaz8186
@awaisfiaz8186 6 жыл бұрын
yeah right explanation link. www.w3schools.com/jsref/jsref_sort.asp
@Adamsandlerwb
@Adamsandlerwb 4 жыл бұрын
@@awaisfiaz8186 Ayoo Chaadd chill broo ahahhahaha!!
@tunamusic2314
@tunamusic2314 3 жыл бұрын
do you know why when we use sort(a,b) => a-b and it will arrange from short to hight value ??
@harshgupta2699
@harshgupta2699 3 жыл бұрын
Hands down! Great explanation. All the concepts relating to higher order functions are now absolutely clear! Thanks to you!
@raducostache8342
@raducostache8342 6 жыл бұрын
Every time I watch one of Brad's videos, I feel my mind expanding. It's awesome!
@AlexandrKalaidzhi
@AlexandrKalaidzhi 5 жыл бұрын
ES5 callback syntax for filter function can be shorter without using if statement: const canDrink = ages.filter(function (age) { return age >= 21; }); The result will be the same. But ES6 is really cool. Thank you for the great lesson.
@tunamusic2314
@tunamusic2314 3 жыл бұрын
ok
@willadams6217
@willadams6217 6 жыл бұрын
Really good video I followed along and added it into my modern Javascript course directory. One thing though you keep saying squared but the Math .sqrt() is the square root not squared.
@01107345
@01107345 3 жыл бұрын
squar't
@aroshm1682
@aroshm1682 Жыл бұрын
Thanks man!! this was super helpful. I always come back to watch this when I'm having doubts.
@ranveerancharaz6732
@ranveerancharaz6732 11 ай бұрын
This is one of the few videos that helped me understand reactjs well ! Thank you for that !
@ernestj8000
@ernestj8000 3 жыл бұрын
Excellent tutorial and pacing. Thanks for recording this. Truly one of the best explanations of these array methods that I have watched.
@CaneSugarHD
@CaneSugarHD 4 жыл бұрын
The for loop you can easily do away with "i" or array tags completely by using (for of) loops for(age of ages){ if(age >= 21){ canDrink.push(age) } }
@childmolester6557
@childmolester6557 3 жыл бұрын
stfu or i ll give u 3piece and a java
@tunamusic2314
@tunamusic2314 3 жыл бұрын
i see ( for ...in ) , means for (age in ages) and don't see (for of ) like you said
@lets_lvl_up
@lets_lvl_up 3 жыл бұрын
I mean, it's better than the old fashioned 4 loop. Actually you can even get ride of the curly brackets: let canDrink = []; for (age of ages) if (age >= 21) canDrink.push(age); But doing it the way it's shown in the video is still more succinct: let canDrink = ages.filter(age => age >= 21);
@karimakatonkarinakaton9608
@karimakatonkarinakaton9608 3 жыл бұрын
0
@vhbatistela
@vhbatistela 2 жыл бұрын
This video is truly amazing! You made it really simple to understand these higher order functions. Thank you for creating it :)
@scottvarieur890
@scottvarieur890 4 жыл бұрын
This has got to be the best video explaining higher level JS functions. There are so many potential pitfalls when you learn this stuff, but you covered just about everything in an extremely concise way.
@coolarun3150
@coolarun3150 6 жыл бұрын
Liked even before read the title
@dimarzio9374
@dimarzio9374 6 жыл бұрын
cool arun Bias. Evaluate the content first. Make the author be better.
@coolarun3150
@coolarun3150 6 жыл бұрын
Dimit Lemekh don't worry man. That like is for his effort not for the quality of the content. i hope people like you will give good comments about the content and make him better.
@alxndrdg8
@alxndrdg8 6 жыл бұрын
looks like you are new here. Those who know Brad, hit the like button first and then watch the video - That's Brad Traversy! He has earned that much respect from us.
@MRMOTOFOTO
@MRMOTOFOTO 6 жыл бұрын
"MAKE THE AUTHOR BETTER".....Bwhahaha!!!!
@RobertTodar
@RobertTodar 6 жыл бұрын
I liked it before I watched it as well :) Now watching it, I wish I could like it again :). Thanks for the great video!
@GmoneyMozart
@GmoneyMozart 6 жыл бұрын
1 dislike from a diehard for loop fan.
@TraversyMedia
@TraversyMedia 6 жыл бұрын
haha. I have 2 people that dislike EVERY video I put out right around the same time. It could be a video showing how to cure cancer with Angular and those 2 dislikes will be there before 2k views. It's like clockwork..
@makasilelo1226
@makasilelo1226 6 жыл бұрын
Sorry, did you read my comment on your last post on GO? If not, I think you have to. It's about piracy
@TraversyMedia
@TraversyMedia 6 жыл бұрын
Can you email me? traversymedia@gmail.com
@cowboy8038
@cowboy8038 6 жыл бұрын
I sent him an email in case you haven't yet, good catch, that is seriously bullshit.
@makasilelo1226
@makasilelo1226 6 жыл бұрын
Thanks
@IRgEEK
@IRgEEK 4 жыл бұрын
Perfect as always Brad. Just what I needed to enrich my lesson plan for tomorrow. Thanks man.
@sammorpeth5367
@sammorpeth5367 4 жыл бұрын
This is such a great video for people like myself who feel like they've plateaued recently. I finally feel like I'm starting to get a grip on arrow functions thanks to this. Cheers!
@nyteskun
@nyteskun 4 жыл бұрын
can some explain how sort algorithm works? is it by a - b, then a - c? or a -b, then c - d? i dont want to just remember how function works without understanding the underlaying operation behind it. its bugging me.
@RickBeacham
@RickBeacham 4 жыл бұрын
developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort If compareFunction(a, b) returns less than 0, sort a to an index lower than b (i.e. a comes first). If compareFunction(a, b) returns 0, leave a and b unchanged with respect to each other, but sorted with respect to all different elements. Note: the ECMAscript standard does not guarantee this behavior, thus, not all browsers (e.g. Mozilla versions dating back to at least 2003) respect this. If compareFunction(a, b) returns greater than 0, sort b to an index lower than a (i.e. b comes first). compareFunction(a, b) must always return the same value when given a specific pair of elements a and b as its two arguments. If inconsistent results are returned, then the sort order is undefined.
@FrancoBaccarini
@FrancoBaccarini 6 жыл бұрын
Hi! Love your content and style. Can't afford to become a Patreon right now, but someday i will. The only way i have to pay your content right now, is with three suggestions for VSCODE :) 1) Instead of copy paste a line, you can ALT+SHIFT+DOWNARROW (or UPARROW). You can do it without selection if you need a single line, or select all the lines you want (SHIFT + UP/DOWN or MOUSE selection.) :) 2) If you need to move the line, just press ALT+DOWNARROW/UPARROW. 3) emmet is enabled by default. Writing CLG->TAB it's equal to console.log(yourcursorisherenow)
@onepiec3
@onepiec3 5 жыл бұрын
this is amazing. you make it so much more easy to understand than a lot of websites I've checked them out on. I love how you're always so clear and concise with your words and you've helped me grow a lot with webdev. thanks!!
@Shshan3
@Shshan3 5 жыл бұрын
This was really helpful. Thank you! I just needed to visualize these methods, and you definitely helped me understand!
@m.h.9927
@m.h.9927 6 жыл бұрын
Boom ! Boom ! i yet not started watching ,, but know You are a Bless for Poorer People ,,, sorry , i have to go to watch .
@gafroninja
@gafroninja 5 жыл бұрын
"Sorry for the yelling upstairs". Actually thought it was my baby waking up, upstairs lol >
@rubenverster250
@rubenverster250 Жыл бұрын
Hey Brad. I've been watching you since the start of my career, when I was a Junior. The time has come where I have outgrown your content. I appreciate all the help and tutorials you've given me over the years. Now you are helping me in explaining these topics to other Juniors :) Thank you
@cosmm7969
@cosmm7969 6 жыл бұрын
A great pleasure for watching these tutorial videos,thank you Brad,keep up the good work !
@rayc3103
@rayc3103 5 жыл бұрын
Can anyone explain to me why the sort returns 1, else -1? How would that result in the companies being sorted?
@shahrukhtramboo6781
@shahrukhtramboo6781 5 жыл бұрын
stackoverflow.com/questions/1494713/how-does-javascripts-sort-work
@javabeanz8549
@javabeanz8549 4 жыл бұрын
If you look back a very long way, I believe it is coming from Assembly language, where you do a COMPARE command, and there are three possible results, basically -1, 0 and 1, so you JUMP LESS THAN, JUMP EQUAL TO or JUMP GREATER THAN... We are only using two here, because the two values must be swapped in one case, and not in the other, while if they are equal, it doesn't matter if they are swapped or not.
@bagaskara1567
@bagaskara1567 4 жыл бұрын
Arrow function is less readable, need more time to understand it
@JustSujC
@JustSujC 4 жыл бұрын
Definitely, but it is technically more concise.
@eddev
@eddev 3 жыл бұрын
Personally I read it just the same, I use em enough it’s just as easy understandable
@dazelmann6589
@dazelmann6589 3 жыл бұрын
Or need more practice to get head around. Get on to work...
@lets_lvl_up
@lets_lvl_up 3 жыл бұрын
Yeah at first it's kinda wierd, but now i think they actually make it more readable by getting rid of the clutter. Hope i don't get bashed for saying this, but they remind my of the pathonic ways xD.
@stevenedwards9262
@stevenedwards9262 3 жыл бұрын
Its a lot more readable, you dont have to declare that the callback is a function, you dont need pointless parentheses around singular parameters/args, and for single-line functions you dont need to specify youre returning something when its already obvious you are. You just need to spend an afternoon sitting down and breaking the pieces down in your head
@anythingtech5711
@anythingtech5711 Жыл бұрын
Brad, Thank You So Much! 🙏 Through your explanation and walkthrough, I was finally able to understand the structure, what it does, the return, and how to console log-it. I was also able to get it through JS to an innerHTML. This type of video is perfect for beginners like me, I am sure, I'm not the only one! 🙏
@sumgue4964
@sumgue4964 5 жыл бұрын
This was really the only acceptable tutorial on javascript arrays on youtube. I was falling behind in a programming bootcamp I am currently attending and this saved the day. Thanks a lot!
@Steve_360
@Steve_360 4 жыл бұрын
you said lets find ages squared but used square root function, haha
@ahmedraza5340
@ahmedraza5340 6 жыл бұрын
Watching from pakistan
@kantyDarius
@kantyDarius 6 жыл бұрын
From Argentina here
@hamadyahmed5379
@hamadyahmed5379 6 жыл бұрын
From Mauritania here
@gulbadsha
@gulbadsha 6 жыл бұрын
Programming has no boundries :)
@awaisfiaz8186
@awaisfiaz8186 6 жыл бұрын
programming is same no matter where you are so get over it lol :D
@khoanguyen3044
@khoanguyen3044 5 жыл бұрын
Vietnam here
@AnaCastro-zp5cr
@AnaCastro-zp5cr 5 жыл бұрын
This video is hands down the best one I found explaining high order functions & arrays. You basically thought me in 35 min what 5 hours of Lynda courses couldn't. Thanks, u da man!
@aijaz4441
@aijaz4441 4 жыл бұрын
Your videos are so through and to the point. Thanks a lot for uploading such high quality content.
@petixclancoc225
@petixclancoc225 5 жыл бұрын
square != Math.sqrt lol 🤣🤣🤣
@greencopycat
@greencopycat 4 жыл бұрын
Math.pow
@djotigergaming1838
@djotigergaming1838 6 жыл бұрын
nice explanation but you forget to mention that some of those methods are not supported in older browsers , you say its gonna make you look better programmer , that's wrong , whats true is : "its gonna make you look that guy who don't know how to support all customers platforms". spsly when you mention arrow functions -cause the basic support for arrow functions start in : chrome 45+ , firefox 22+ , opera 32+ ,safari 10+ , android webview 45+ , internet explorer : "not yet" ! - Trailing comma in parameters in functions arrow support start in : chrome 58+ , firefox 52+ ,opera 45+ ,android webview 58+
@kanonbolt100
@kanonbolt100 5 жыл бұрын
If you're supporting older browsers right off the top of your head instead of using tools like babel that compile your ES6 and above. I guarantee you, you're not getting as much done as you think you are.
@perc-ai
@perc-ai 5 жыл бұрын
you need to use babel, es6 is industry standard now
@MP-mh1tu
@MP-mh1tu 3 жыл бұрын
This is the only clearly explained video I've seen about this function. Thank you.
@iamleomoko
@iamleomoko Жыл бұрын
Thank you Brad. I appreciate your courteousness in apologizing for the activity in the background.
@SlimTrackStar
@SlimTrackStar 3 жыл бұрын
here we are in 2020 and this makes so much sense. I needed this to understand the .map method, but revisiting the other methods definitely helped everything mesh beautifully. this was absolutely necessary. I can appreciate how concise this was with very simple and consistent examples. thank you. i definitely liked and subscribed.
@Marder1989
@Marder1989 Жыл бұрын
one of the best tutorials i have seen for programming so far, very nice job
@barmalini
@barmalini 4 жыл бұрын
I'm so glad I've never learned the ES5 and the earlier, so less trouble to re-learn old tricks on the new manner! Thanks Brad, bought almost all of the courses with your name on it on Eduonix and you are the best teacher I've ever met.
@dazelmann6589
@dazelmann6589 3 жыл бұрын
Huh! Then you have just missed the reason why they opted for better approach than previous ones. Plus it's just a syntax difference...in actual computation power it doesn't matter. Algorithm does but not syntax. It's just make your code more concise and readable
@jacquelinemendez3962
@jacquelinemendez3962 7 ай бұрын
Thank you for this video. I'm doing 100devs right now and this really helps reinforce my reading homework.
@dovenobertinca4029
@dovenobertinca4029 2 жыл бұрын
Oh Man, you are more than capable of explaining, not of the best, but the BEST of all time. Believe it or not, high paid webmasters do not have the skills you have.
@andrewwatson9000
@andrewwatson9000 3 жыл бұрын
Dude, your videos are fantastic. Massively appreciate the work you put in to them. Cheers!
@aliakeel
@aliakeel 4 ай бұрын
thanks so much! i like how you used for loops to explain what all the methods really do.
@ahmedehab6750
@ahmedehab6750 2 жыл бұрын
You are a lifesaver, I'm currently learning and I had so much confusion about this topic and your explanation made it crystal clear
@bchoor
@bchoor 6 жыл бұрын
Awesome video! Every second was valuable.... been following your stuff, but this one ranks highest for me so far. Topic, pace, and material were spot on!
@kopilkaiser8991
@kopilkaiser8991 2 жыл бұрын
I understood the topic of Higher Order Functions because of you. Thank you brother for putting the effort in explaining, thus give insights and passing your exceptional knowledge to the public. My support is for you
@annalizziemarino
@annalizziemarino Жыл бұрын
This tutorial is great. I've learned so much from everything I've watched of yours. Thank you so much!
@johnnweke5547
@johnnweke5547 4 жыл бұрын
Brad. Mannnn. This tutorial is fire. I had been trying to understand arrow functions for a while now! And the whole map/reduce/forEach/filter...this is Simple and to the point. Better than udacity's JS OOP course if you ask me. Gonna be supporting financially soon bro. This is really good. Thank You so much. Best, John.
@BobbyBundlez
@BobbyBundlez 4 жыл бұрын
omfg ur explanation of how if only one parameter is in fuction then it doesnt need paranthesis cleared up SO much for me, thank u
@mamahumen
@mamahumen 3 жыл бұрын
No doubt, one of the best and most important tutorials I have ever watched. @TraversyMedia, Many thanks.
@amantlemashele5719
@amantlemashele5719 3 жыл бұрын
Thank you for this! It wasn't rushed and the content layout and comparisons to for loops made sense. Thank you
@cosmicunity7263
@cosmicunity7263 4 жыл бұрын
Dude your the man. I can't thank you enough for always making great educational videos.
@daviddrahllensa4165
@daviddrahllensa4165 3 жыл бұрын
My native language it´s spanish, and i understood better than people that explains on spanish. Thank you so much, great teaching.
@ErnestGWilsonII
@ErnestGWilsonII 6 жыл бұрын
Super thumbs up, awesome video, my head is spinning from all the awesome Tools in such a short video, every one of these is going into my tool kit, thank you for making this video and sharing it
@timzgeybi1026
@timzgeybi1026 4 жыл бұрын
broo your videos are the best videos EVER!!!!!!!! like whatever i search about javascript i find your channel and believe me when i say i be pretty sure i will understand cuz you explain everything in a simple but efficient way Keep going : )
@Z3R01d
@Z3R01d 6 жыл бұрын
Will be great to see more videos like this Brad, I got so hyped just watching it.
@lfrommtl
@lfrommtl 3 жыл бұрын
thank you so much! im doing a bootcamp and got tripped up on this. pretty sure they explained it exactly like you did but the pacing was too fast for me to grasp the concepts. this really really helped. thanks again!
@Ratchet2022
@Ratchet2022 2 жыл бұрын
Hi Brad, I Really liked how you used the normal function syntax first and then showed how to write the arrow function syntax for each. As someone relatively new to JavaScript, I think this helped me immensely as I kept getting stuck in trying to understand what's going on with the arrow functions. JavaScript in general on the other hand is sort of a mess compared to languages engineered to enforce OOP or that don't usually have "higher order functions," but that's another story.
@zacwilliamson1140
@zacwilliamson1140 2 жыл бұрын
Super helpful video. These methods finally clicked for me. Thank you!
@mrrajiibraheemfse919
@mrrajiibraheemfse919 Жыл бұрын
This is a great tutorial, very informative . Well-done
@barryallen2560
@barryallen2560 2 жыл бұрын
this video is literally what've been looking for, keep up the good work :>
@AyiFahmi460
@AyiFahmi460 3 жыл бұрын
Just following this course, once again thankyou so much mr Brad for all your effort.
@kevinzhang8974
@kevinzhang8974 6 жыл бұрын
get up @ 6:00 and did this tutorial ... it is a fantastic exercise to massage my brain before I jump into real JS coding today... Thank Brad for the excellent video
@freston75
@freston75 6 жыл бұрын
Thank you! I've been needing video for a while now! Keep up the awesome videos.
JavaScript OOP Crash Course (ES5 & ES6)
40:21
Traversy Media
Рет қаралды 577 М.
Higher Order Functions - JavaScript Tutorial
10:10
ColorCode
Рет қаралды 56 М.
Secret Bunker VS Bounty Hunter!😳⚠️
00:40
Ben Azelart
Рет қаралды 56 МЛН
WWE is real💔
00:16
IShowSpeed
Рет қаралды 68 МЛН
Async JS Crash Course - Callbacks, Promises, Async Await
24:31
Traversy Media
Рет қаралды 1,4 МЛН
HTMX Crash Course | Dynamic Pages Without Writing Any JavaScript
56:47
Traversy Media
Рет қаралды 118 М.
map, filter & reduce 🙏 Namaste JavaScript Ep. 19 🔥
37:42
Akshay Saini
Рет қаралды 820 М.
Higher Order Functions in JavaScript Explained Simply
9:55
Teddy Smith
Рет қаралды 5 М.
You might not need useEffect() ...
21:45
Academind
Рет қаралды 107 М.
Dear Functional Bros
16:50
CodeAesthetic
Рет қаралды 404 М.
JavaScript Pro Tips - Code This, NOT That
12:37
Fireship
Рет қаралды 2,5 МЛН
JavaScript DOM Crash Course - Part 1
39:01
Traversy Media
Рет қаралды 1,1 МЛН
All 33 JavaScript Array Methods In One Video
51:11
Code Explained
Рет қаралды 21 М.
8 Must Know JavaScript Array Methods
10:05
Web Dev Simplified
Рет қаралды 1 МЛН
Адский китайский Apple Vision Pro
1:00
Wylsacom
Рет қаралды 1,5 МЛН