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)
@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
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!
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..
RIght now I have reached a level where searching for a video within "Traversy Media" channel seems to be more bliss than searching whole UA-cam. Top class Brad :)
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!
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!!!
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
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.
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 :)
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.
so the only reason I would recommend this or anything that Travis does because he's the real deal... He records these videos and does paid udemy courses at the same time.... That's big time... his courses are well worth the subscription but he goes above and beyond with these vids for us.. it's all about knowledge. .. So rare.
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!
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!
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
@@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
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.
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
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.
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!!!
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
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.
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!
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.
As a self-learning student of JavaScript, I am grateful for your content. Your explanations are clear and your voice is sooo calming! LOL. Thank you fine sir!
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)
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.
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);
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.
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!
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.
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.
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.
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.
Brad is the GOAT 🐐 . I’m taking an online bootcamp and they totally skipped over the ES5 and prior. Which makes sense as to how it works. They just dove straight into ES6 which doesn’t make sense unless you know the older syntax, for me anyway. I love you brad!!!
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..
To sort the companies in order of start date: const sortedCompanies = companies.sort((c1, c2) => c1.start > c2.start) You can do the same thing on ages sorting as well. Great video! I learned a ton!
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.
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
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.
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.
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
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!
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+
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.
I'm coming from a C++ background now learning full stack as I'd like to get a job in it and wow you guys using JS don't know you're born! After writing a multiplatform openGL and C++ renderer and trying to set up environments and build systems I don't ever want to hear any web developer complain their job is difficult! C++ is becoming better nowadays but still.. JS is so nice and clean and easy to use even writing predicates for these array algorithms seem way easier lol.
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
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 : )
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.
Heading over to Udemy to buy the course now...I watched this to clarify some problems I was working on in another course. This answered EVRYTHING, and made me understand what I thought I knew even better.
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!
i also would like to say that i went to your website and it has by far one of the nicest layouts and visually pleasing websites of coding UA-camrs that I've seen
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! 🙏
23:40 you could just make *.sort((a, b) => a.start - b.start)* , it's even shorter and doesn't change the position of equal values (in which the return is equal 0, since in some cases it may make a difference).
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!!
This video really helped it click for me. I’m using it in conjunction with the eloquent JavaScript book which at times is amazing and at times brain-frying. I feel I have a much better grasp on these array methods after watching this. Will definitely be buying the udemy course
Thanks a lot brad! You totally changed me to become a Good UI UX Developer since i completed bootstrap 4 course from udemy. Also your video about your life. I love and always wait for your videos. You are my favorite UA-camr. A reply from you will make my day!
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.
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)
Thank you,
thanks, dude
@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
Appreciate it
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!
Really, nice man congrats, i wanna a job as a full stack and i will get by brad classes
@stillFLiP i just wanted to ask the same.
Because in my country we have requirements like 5years work as a developer.
Thats insane
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..
that's nice
what is your salary
?
RIght now I have reached a level where searching for a video within "Traversy Media" channel seems to be more bliss than searching whole UA-cam. Top class Brad :)
Thanks :)
Lol, same here. My preferred google search on a topic is now "Traversy (topic)". That says a lot :)
@@Nemcoification Funny to read this comment. I have done exactly this the last two weeks.
@@Nemcoification Same here
Well put, same here!
Those "Now put it on pause and try to do it yourself" are gems in your videos man, really helps to learn!
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!
I am from India and I can say your teaching way is better than our IIT teacher.
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!!!
agreed
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
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.
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 :)
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.
I've been struggling with these functions for a while, and this video really helped!
so the only reason I would recommend this or anything that Travis does because he's the real deal... He records these videos and does paid udemy courses at the same time.... That's big time... his courses are well worth the subscription but he goes above and beyond with these vids for us.. it's all about knowledge. .. So rare.
I really don't get how can ppl dislike a video of a guy who gives them some knowledge for free ... like how ??
Maybe by clicking on the dislike button. 🤔🤔
My native language it´s spanish, and i understood better than people that explains on spanish. Thank you so much, great teaching.
Great examples. I love how you break things down and then show simpler ways of getting the same results. Really helpful. Thanks, Brad
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!
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..
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!
For an even shorter way of sorting the Company starts:
const sortedCompanies = companies.sort((a,b) => a.start - b.start);
yeah right explanation link.
www.w3schools.com/jsref/jsref_sort.asp
@@awaisfiaz8186 Ayoo Chaadd chill broo ahahhahaha!!
do you know why when we use sort(a,b) => a-b and it will arrange from short to hight value ??
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
Thank you Traversey, your content inspires a lot to make my day to day work better.
Thank you for explaining things calmly , orderly and easy to understand.... so hard to find to find people with this talent .
Thanks Brad for this. I was preparing a lesson for my Cambridge students. This helped greatly. Keep it going man.
are you a teacher of Cambridge University?
I am newbie and learning coding . I have questions here , we are passing company as parameter but company is not defined anywhere ?
@@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
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.
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
Have you tried the course?
How would you rate the course?
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.
yeah check out his courses on Udemy if you'd like to show some support to his great content :)
Web Surfer pls tell me how to find his tutorials on udemy
Man you've got no idea how much you help a person in need. God bless you!
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!!!
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
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.
ok
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!
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.
squar't
Software student and first time watcher here. You did a phenomenal job of breaking this down so a week 4 student like myself could understand.
On your way to 300,000K, Good for you. Your the best!
As a self-learning student of JavaScript, I am grateful for your content. Your explanations are clear and your voice is sooo calming! LOL. Thank you fine sir!
Very well explained! Thank you. You must have accidentally mixed up square vs square root though!
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
Excellent tutorial and pacing. Thanks for recording this. Truly one of the best explanations of these array methods that I have watched.
4 years later - Thank you Brad for the refresher!
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)
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.
Thank you! buy brad js udemy course is gold
Kali 33 hi, is it the modern JavaScript one or any other js course
Abdul Gafoor the modern one
Thank you Brad. I appreciate your courteousness in apologizing for the activity in the background.
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)
}
}
stfu or i ll give u 3piece and a java
i see ( for ...in ) , means for (age in ages) and don't see (for of ) like you said
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);
0
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.
Hi Man , please keep doing tutorials videos , i love 'em a lot 😍😍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍
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!
Thank you so much. Your explanation was amazing. lovely!
This is the only clearly explained video I've seen about this function. Thank you.
Liked even before read the title
cool arun Bias. Evaluate the content first. Make the author be better.
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.
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.
"MAKE THE AUTHOR BETTER".....Bwhahaha!!!!
I liked it before I watched it as well :) Now watching it, I wish I could like it again :). Thanks for the great video!
This guy is absolutely not boring and voice is soothing.
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.
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.
Brad is the GOAT 🐐 . I’m taking an online bootcamp and they totally skipped over the ES5 and prior. Which makes sense as to how it works.
They just dove straight into ES6 which doesn’t make sense unless you know the older syntax, for me anyway.
I love you brad!!!
1 dislike from a diehard for loop fan.
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..
Sorry, did you read my comment on your last post on GO? If not, I think you have to. It's about piracy
Can you email me? traversymedia@gmail.com
I sent him an email in case you haven't yet, good catch, that is seriously bullshit.
Thanks
To sort the companies in order of start date:
const sortedCompanies = companies.sort((c1, c2) => c1.start > c2.start)
You can do the same thing on ages sorting as well.
Great video! I learned a ton!
thanks for sharing this one!
Thanks man!! this was super helpful. I always come back to watch this when I'm having doubts.
Boom ! Boom ! i yet not started watching ,, but know You are a Bless for Poorer People ,,, sorry , i have to go to watch .
Half way through your video and your tutorial is absolutely magical. THANK YOU!
Can anyone explain to me why the sort returns 1, else -1? How would that result in the companies being sorted?
stackoverflow.com/questions/1494713/how-does-javascripts-sort-work
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.
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
"Sorry for the yelling upstairs". Actually thought it was my baby waking up, upstairs lol >
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.
Arrow function is less readable, need more time to understand it
Definitely, but it is technically more concise.
Personally I read it just the same, I use em enough it’s just as easy understandable
Or need more practice to get head around.
Get on to work...
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.
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
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!
Watching from pakistan
From Argentina here
From Mauritania here
Programming has no boundries :)
programming is same no matter where you are so get over it lol :D
Vietnam here
Traversy Media is the best programmer in my life :) very nice line by line explain
you said lets find ages squared but used square root function, haha
one of the best tutorials i have seen for programming so far, very nice job
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+
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.
you need to use babel, es6 is industry standard now
I'm coming from a C++ background now learning full stack as I'd like to get a job in it and wow you guys using JS don't know you're born! After writing a multiplatform openGL and C++ renderer and trying to set up environments and build systems I don't ever want to hear any web developer complain their job is difficult! C++ is becoming better nowadays but still.. JS is so nice and clean and easy to use even writing predicates for these array algorithms seem way easier lol.
square != Math.sqrt
lol 🤣🤣🤣
Math.pow
Thank you for this video. I'm doing 100devs right now and this really helps reinforce my reading homework.
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
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 : )
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.
No doubt, one of the best and most important tutorials I have ever watched. @TraversyMedia, Many thanks.
If there’s an award for the best and the most decent UA-camr in the world, I will vote for you without having a second thought.
This is one of the few videos that helped me understand reactjs well !
Thank you for that !
Heading over to Udemy to buy the course now...I watched this to clarify some problems I was working on in another course. This answered EVRYTHING, and made me understand what I thought I knew even better.
How can you not Love this Guy.... Thank you. Dude.
This really takes some intimidating looking concepts and explains them simply, thanks
Amazingly encapsulated solutions into single-liner definitions of power! Great job Brad!
idk what i would do without you man. Thank you for your efforts. after this its time to watch the express crash course lol
Every time I watch one of Brad's videos, I feel my mind expanding. It's awesome!
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!
This video was so good, I shared it with some of my co-workers who are trying to learn javascript.
What i like most is that you show and the old way!
i also would like to say that i went to your website and it has by far one of the nicest layouts and visually pleasing websites of coding UA-camrs that I've seen
Hands down! Great explanation. All the concepts relating to higher order functions are now absolutely clear! Thanks to you!
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! 🙏
23:40 you could just make *.sort((a, b) => a.start - b.start)* , it's even shorter and doesn't change the position of equal values (in which the return is equal 0, since in some cases it may make a difference).
he shows this technique on age array, I think he just wanna show us the different techniques to achieve the same output
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!!
This video really helped it click for me. I’m using it in conjunction with the eloquent JavaScript book which at times is amazing and at times brain-frying. I feel I have a much better grasp on these array methods after watching this. Will definitely be buying the udemy course
Thank you for making it look so simple! God Bless you for this wonderful tutorial!
This tutorial is great. I've learned so much from everything I've watched of yours. Thank you so much!
Thanks a lot brad! You totally changed me to become a Good UI UX Developer since i completed bootstrap 4 course from udemy. Also your video about your life. I love and always wait for your videos. You are my favorite UA-camr. A reply from you will make my day!
Thanks a lot for the clear explanation of the High Order Functions... surely a great help.
It was a pleasure to watch it and learn from you, it is a clean and smooth explanation of all the stuff.
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.
this worked as well :
const finTech = companies.filter((comp) => comp.category.match("Fintech"));
console.log(finTech);
top Brad