JavaScript Chaining Array Methods and Using Arrow Functions

  Рет қаралды 12,242

Steve Griffith - Prof3ssorSt3v3

Steve Griffith - Prof3ssorSt3v3

7 жыл бұрын

This tutorial combines several things that have been discussed through my other videos.
- How you can use the various Array methods on multi-dimensional arrays or Arrays of Objects (think JSON).
- How you can chain together calls to Array methods.
- How you can use ES6 Arrow Functions together with the chained Array methods to write your code very efficiently.
Code Gist: gist.github.com/prof3ssorSt3v...
Arrow Function video: • ES6 JavaScript Arrow F...

Пікірлер: 27
@rotrose7531
@rotrose7531 4 жыл бұрын
I total agree with others, you are not normal, to pack everything within 10 minutes or so yet still keep every explanation in order. Your work deserves everyone's respect. Thank you.
@tinpham6413
@tinpham6413 3 жыл бұрын
when i watch building project tutorial, some of the "chain array method confused me" , but I think it's no longer. Thanks for your series. My basic JS knowledge are enhancing right now
@justaprogrammer3764
@justaprogrammer3764 5 жыл бұрын
You cleared up so much topics in one blow and under 10 mins. Your not a normal teacher, your way up high in the talented teachers list. I will be recommending you to everyone that cares and i will be going through all of your tutorials, one at time. Have a great day.
@alioooph6186
@alioooph6186 4 ай бұрын
This was so helpful and easy to understand! Thanks so much!
@aprilformosa
@aprilformosa 5 жыл бұрын
Thank you so much for this series. I think your videos are underrated, which is a shame. I've shared them on Twitter. Hope more people will benefit from your tutorials. Thanks again.
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 5 жыл бұрын
Glad they help.
@sakshamsrivastava6280
@sakshamsrivastava6280 3 жыл бұрын
ThankYou so much for making it a very clear video
@melodiazg
@melodiazg Жыл бұрын
You're awesone!, thank you!
@fidtran4991
@fidtran4991 4 жыл бұрын
Thank you so much for an amazing lecture! I learn those methods today but I did not have a chance to practice any problem that need a combinations of Array#filter and Array#map.
@chesterxp508
@chesterxp508 2 жыл бұрын
Brilliant tutorials :)
@riceputiGiandomenico
@riceputiGiandomenico 4 жыл бұрын
You are amazing 🙂thank you so much for your work !!!
@ryanbooth1385
@ryanbooth1385 3 жыл бұрын
How would you return the indexOf if you were looking for a number greater than a certain number? For instance in this example if you wanted the people with "id" > 300?
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 3 жыл бұрын
indexOf does string comparisons for matching. If you want to do some other type of matching / testing in an Array then you would probably want the filter method - kzbin.info/www/bejne/jaOlkGBjl7uVmNU
@batyr71
@batyr71 7 жыл бұрын
is it a type of functional programming?
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 7 жыл бұрын
It's showing how you can move towards a functional programming approach. Functional programming is all about using pure functions to transform data. A pure function is just a function that does one thing and returns the same output every time you provide the same input. As an example, if you wrote a function that only extracted all the email addresses from the original array, then that would be a pure function. If your function also changed something in your UI then it is no longer a pure function. It would be dependent on BOTH the input array AND the current state of the UI. When you use pure functions that have predictable behaviour and limited responsibility, then you can chain them together with predictable results. Arrow functions work well with small pure functions. Breaking the code into small functions that can be chained together is a functional programming approach.
@Human_Evolution-
@Human_Evolution- 3 жыл бұрын
amazing. ya font is too small tho
@johnywhy4679
@johnywhy4679 4 жыл бұрын
Awesome vids! Really helping me learn. Suggestion: For *me,* the undefines in your output are a bit confusing, cuz they aren't from the new code you just typed. So i have to try and figure out what in your code is generating the undefines. And then try and figure out which code is related to the correct output... hrm. Would be clearer FOR ME to just show one output at a time-- the output of the code you just typed. But this is just me!
@xiaxialuu
@xiaxialuu 3 жыл бұрын
In general, when should you have a comment in your code? I understand that when your code is hard to read then write a comment. I was taught to erase all my comments. To me that is not a good advice, I think comments can help another developer understand my code.
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 3 жыл бұрын
I never érase comments. You are right that is bad advice. Any time your code is not obvious to a junior developer - that is a good time to add a comment.
@xiaxialuu
@xiaxialuu 3 жыл бұрын
The instructor said the reason to erase the comments is “it’s easier to read.”
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 3 жыл бұрын
@@xiaxialuu that's a poor reason... and not really true...
@MohamedAhmed-xg3bg
@MohamedAhmed-xg3bg 3 жыл бұрын
do you have a facebook ?
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 3 жыл бұрын
I dont use Facebook
@MohamedAhmed-xg3bg
@MohamedAhmed-xg3bg 3 жыл бұрын
@@SteveGriffith-Prof3ssorSt3v3 what do you use to connect with your followers
@Eltopshottah
@Eltopshottah 2 жыл бұрын
Thank you so much 🌤
JavaScript Closures
14:22
Steve Griffith - Prof3ssorSt3v3
Рет қаралды 5 М.
Understanding the Keyword THIS in JavaScript
13:59
Steve Griffith - Prof3ssorSt3v3
Рет қаралды 8 М.
Manipulating and Sorting Arrays in JavaScript
12:32
Steve Griffith - Prof3ssorSt3v3
Рет қаралды 21 М.
8 Must Know JavaScript Array Methods
10:05
Web Dev Simplified
Рет қаралды 1 МЛН
JavaScript Function Currying
11:41
Steve Griffith - Prof3ssorSt3v3
Рет қаралды 15 М.
JavaScript Array filter method
9:15
Steve Griffith - Prof3ssorSt3v3
Рет қаралды 18 М.
Real World Array Method Uses in JavaScript Web Development
24:18
Steve Griffith - Prof3ssorSt3v3
Рет қаралды 12 М.
JavaScript ES6 Arrow Functions Tutorial
9:32
Web Dev Simplified
Рет қаралды 824 М.
I've been using Redis wrong this whole time...
20:53
Dreams of Code
Рет қаралды 347 М.
16.9: Array Functions: sort() - Topics of JavaScript/ES6
9:19
The Coding Train
Рет қаралды 165 М.
Arrow Functions JavaScript Tutorial - What NOT to do!!!
31:48
ColorCode
Рет қаралды 54 М.