Map, Filter & Reduce EXPLAINED in JavaScript - It's EASY!

  Рет қаралды 24,433

dcode

dcode

Күн бұрын

In today's video I'll be taking you through my favourite 3 methods in JavaScript: map, filter and reduce. All of these are useful array methods that you'll likely need as you develop JavaScript applications or websites.
Chapters:
0:00 Intro
1:15 map
3:37 filter
5:57 filter & map
6:56 reduce
11:12 Outro
For your reference, check this out:
developer.mozilla.org/en-US/d...
developer.mozilla.org/en-US/d...
developer.mozilla.org/en-US/d...
🏫 My Udemy Courses - www.udemy.com/user/domenic-co...
🎨 Download my VS Code theme - marketplace.visualstudio.com/...
💜 Join my Discord Server - / discord
🐦 Find me on Twitter - / dcodeyt
💸 Support me on Patreon - / dcode
📰 Follow me on DEV Community - dev.to/dcodeyt
📹 Join this channel to get access to perks - / @dcode-software
If this video helped you out and you'd like to see more, make sure to leave a like and subscribe to dcode!
#dcode #javascript

Пікірлер: 43
@victormuuo235
@victormuuo235 4 ай бұрын
I'm not that dev who drops comments on every tutorial, but bro honestly, you gat it ! Big thumbs up
@StevieB86
@StevieB86 Жыл бұрын
You've got yourself another well-deserved subscriber. Your teaching style is excellent and very easy to follow. Thanks for introducing me to the concept of chaining methods together, this is fantastic!
@Shadel.
@Shadel. 6 ай бұрын
Thanks for your efforts. These methods are really great, useful and pratic.
@shanardgreen513
@shanardgreen513 Жыл бұрын
I loved your video it really helped me with a tough project I'm undertaking at work. You are awesome! *Subscribed*
@freddyrichter5920
@freddyrichter5920 2 жыл бұрын
This made it so understandable, thank you
@Phill_F
@Phill_F 10 ай бұрын
In my beginner opinion, you explained this super well, thank you!
@parinsheth4971
@parinsheth4971 2 жыл бұрын
That made it easy to learn! Ty sir
@Neddie2k
@Neddie2k Жыл бұрын
This a perfect example to describe 3 simple functions that seem complex. I subscribed.
@joshuaogbum8930
@joshuaogbum8930 2 жыл бұрын
helped alot, your a king
@chromechef891
@chromechef891 2 жыл бұрын
Nice explanation over the topic!
@summitbs
@summitbs Жыл бұрын
This made it so understandable
@malikgulraiz3659
@malikgulraiz3659 7 ай бұрын
My understanding with these arrays methods after watching your video 📈📈
@srinivasaraoyp3640
@srinivasaraoyp3640 9 ай бұрын
Very interesting demo. Thank you.
@youvegotmail9385
@youvegotmail9385 Жыл бұрын
Great explanation man.
@midwestmetro6361
@midwestmetro6361 Жыл бұрын
Thanks a lot, very simple to understand
@thanasisathanasi4965
@thanasisathanasi4965 Жыл бұрын
Thank you brother. I came here for this reason !!!
@antonijabaric8389
@antonijabaric8389 Жыл бұрын
Finally something to understand. Great example. Thank you!
@dcode-software
@dcode-software Жыл бұрын
You're welcome! Happy it helped
@rangabharath4253
@rangabharath4253 2 жыл бұрын
Awesome 👍😎
@user-sc1wy5rh6l
@user-sc1wy5rh6l 8 ай бұрын
Made it simple and easy to understand Thanks man!
@dcode-software
@dcode-software 8 ай бұрын
Glad to hear it!
@academicdeaneducation6671
@academicdeaneducation6671 Жыл бұрын
What does "person" represent? Is "person" suppose to be an object in the new array? Trying to map the syntax to the logic. Thank you for your channel. New subscriber!
@Salah-YT
@Salah-YT 2 жыл бұрын
thank u so much bro so i did learn before people say arrow function don't need return so I did try it its work so just like that, const names = people.map((person) => person.name); thanx anyway
@dcode-software
@dcode-software 2 жыл бұрын
Welcome 👍 arrow functions don't need to use "return" when you have a one-liner.
@Salah-YT
@Salah-YT 2 жыл бұрын
@@dcode-software thx bro
@rhn8696
@rhn8696 2 жыл бұрын
thank you so much!!!
@dcode-software
@dcode-software 2 жыл бұрын
You're welcome, glad it was helpful!
@nour3660
@nour3660 Жыл бұрын
my brain started drifting away in the middle of the reduce method explanation.
@simranjit2000
@simranjit2000 Жыл бұрын
very nice video brother
@BSITVinluanEner
@BSITVinluanEner Жыл бұрын
thanks brooo !
@dcode-software
@dcode-software Жыл бұрын
You're welcome mate.
@hellothere8547
@hellothere8547 2 жыл бұрын
The Udemy course link isn’t working from the U.S.
@amerhaadiaan6374
@amerhaadiaan6374 2 жыл бұрын
Hi. What color do you use vscode for?
@dcode-software
@dcode-software 2 жыл бұрын
I use the 'dcode' VS Code theme - you can find it on the VS Code Marketplace
@amerhaadiaan6374
@amerhaadiaan6374 2 жыл бұрын
@@dcode-software 💕❤❤❤
@scott_itall8638
@scott_itall8638 11 ай бұрын
what about when with an array provided you get .filter is not a function? an array passed into a function to filter the array.
@user87546
@user87546 Жыл бұрын
In the map case... what happens if one of the 3 objects has no name porperty? The resulting array woudn't be of the same length as the original? Or what??
@user87546
@user87546 Жыл бұрын
I just checked, it fills that space in the array with undefined
@andrewmallett4516
@andrewmallett4516 Жыл бұрын
nice
@Mark-nh7zg
@Mark-nh7zg Жыл бұрын
How does the code know that "person" refers to the objects in the array if the name of the objects (person) was never defined?
@larkharo8863
@larkharo8863 Жыл бұрын
He is mapping through people, creating person as the argument, then passing in the person.name as the return value. Person.name goes back to the people array and grabs the name of each person then moving it to the new names variable.
@Mark-nh7zg
@Mark-nh7zg Жыл бұрын
@@larkharo8863 Thank you! When a function argument uses a label that has not been defined elsewhere, that's basically like creating a variable for the function that represents the argument of the function, is that right?
@nedyalkotodorov4535
@nedyalkotodorov4535 Жыл бұрын
well deserved follow and like simple and nice explanation
12 Things Every JavaScript Developer Should Know
14:29
dcode
Рет қаралды 10 М.
Balloon Stepping Challenge: Barry Policeman Vs  Herobrine and His Friends
00:28
ГДЕ ЖЕ ЭЛИ???🐾🐾🐾
00:35
Chapitosiki
Рет қаралды 7 МЛН
When someone reclines their seat ✈️
00:21
Adam W
Рет қаралды 26 МЛН
map, filter & reduce 🙏 Namaste JavaScript Ep. 19 🔥
37:42
Akshay Saini
Рет қаралды 850 М.
8 Must Know JavaScript Array Methods
10:05
Web Dev Simplified
Рет қаралды 1 МЛН
Maps vs. Objects in JavaScript - What's the Difference?
11:48
Unlocking your CPU cores in Python (multiprocessing)
12:16
mCoding
Рет қаралды 293 М.
...spread operator and rest operator - Beau teaches JavaScript
6:58
freeCodeCamp.org
Рет қаралды 152 М.