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

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 ก.ค. 2024
  • 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

ความคิดเห็น • 44

  • @victormuuo235
    @victormuuo235 5 หลายเดือนก่อน +1

    I'm not that dev who drops comments on every tutorial, but bro honestly, you gat it ! Big thumbs up

  • @StevieB86
    @StevieB86 ปีที่แล้ว +4

    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!

  • @Phill_F
    @Phill_F ปีที่แล้ว

    In my beginner opinion, you explained this super well, thank you!

  • @shanardgreen513
    @shanardgreen513 ปีที่แล้ว +1

    I loved your video it really helped me with a tough project I'm undertaking at work. You are awesome! *Subscribed*

  • @Neddie2k
    @Neddie2k ปีที่แล้ว

    This a perfect example to describe 3 simple functions that seem complex.
    I subscribed.

  • @freddyrichter5920
    @freddyrichter5920 2 ปีที่แล้ว +1

    This made it so understandable, thank you

  • @thanasisathanasi4965
    @thanasisathanasi4965 ปีที่แล้ว

    Thank you brother. I came here for this reason !!!

  • @malikgulraiz3659
    @malikgulraiz3659 9 หลายเดือนก่อน

    My understanding with these arrays methods after watching your video 📈📈

  • @parinsheth4971
    @parinsheth4971 2 ปีที่แล้ว +1

    That made it easy to learn! Ty sir

  • @Shadel.
    @Shadel. 7 หลายเดือนก่อน +1

    Thanks for your efforts. These methods are really great, useful and pratic.

  • @joshuaogbum8930
    @joshuaogbum8930 2 ปีที่แล้ว

    helped alot, your a king

  • @chromechef891
    @chromechef891 2 ปีที่แล้ว

    Nice explanation over the topic!

  • @summitbs
    @summitbs ปีที่แล้ว

    This made it so understandable

  • @youvegotmail9385
    @youvegotmail9385 ปีที่แล้ว

    Great explanation man.

  • @midwestmetro6361
    @midwestmetro6361 ปีที่แล้ว

    Thanks a lot, very simple to understand

  • @srinivasaraoyp3640
    @srinivasaraoyp3640 10 หลายเดือนก่อน

    Very interesting demo. Thank you.

  • @antonijabaric8389
    @antonijabaric8389 ปีที่แล้ว

    Finally something to understand. Great example. Thank you!

  • @nour3660
    @nour3660 ปีที่แล้ว

    my brain started drifting away in the middle of the reduce method explanation.

  • @rangabharath4253
    @rangabharath4253 2 ปีที่แล้ว +1

    Awesome 👍😎

  • @user-sc1wy5rh6l
    @user-sc1wy5rh6l 10 หลายเดือนก่อน

    Made it simple and easy to understand Thanks man!

  • @Salah-YT
    @Salah-YT 2 ปีที่แล้ว +4

    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 ปีที่แล้ว +4

      Welcome 👍 arrow functions don't need to use "return" when you have a one-liner.

    • @Salah-YT
      @Salah-YT 2 ปีที่แล้ว +1

      @@dcode-software thx bro

  • @simranjit2000
    @simranjit2000 ปีที่แล้ว

    very nice video brother

  • @hellothere8547
    @hellothere8547 2 ปีที่แล้ว +1

    The Udemy course link isn’t working from the U.S.

  • @rhn8696
    @rhn8696 2 ปีที่แล้ว +1

    thank you so much!!!

    • @dcode-software
      @dcode-software  2 ปีที่แล้ว

      You're welcome, glad it was helpful!

  • @academicdeaneducation6671
    @academicdeaneducation6671 ปีที่แล้ว +1

    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!

  • @scott_itall8638
    @scott_itall8638 ปีที่แล้ว

    what about when with an array provided you get .filter is not a function? an array passed into a function to filter the array.

  • @BSITVinluanEner
    @BSITVinluanEner ปีที่แล้ว

    thanks brooo !

  • @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

  • @amerhaadiaan6374
    @amerhaadiaan6374 2 ปีที่แล้ว +2

    Hi. What color do you use vscode for?

    • @dcode-software
      @dcode-software  2 ปีที่แล้ว +2

      I use the 'dcode' VS Code theme - you can find it on the VS Code Marketplace

    • @amerhaadiaan6374
      @amerhaadiaan6374 2 ปีที่แล้ว

      @@dcode-software 💕❤❤❤

  • @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?

  • @andrewmallett4516
    @andrewmallett4516 ปีที่แล้ว

    nice

  • @nedyalkotodorov4535
    @nedyalkotodorov4535 2 ปีที่แล้ว

    well deserved follow and like simple and nice explanation