Javascript .filter(), .map() and .reduce() on real world examples

Поділитися
Вставка
  • Опубліковано 7 лис 2024

КОМЕНТАРІ • 48

  • @nadiaharrismartinez
    @nadiaharrismartinez 2 роки тому +5

    So concise and really well done. Thanks for this!

  • @Llytkm
    @Llytkm 3 роки тому +2

    Wow the real world example helps alot. Thanks

  • @williamjog93
    @williamjog93 4 роки тому +4

    Thanks for the excellent explanation, using separate methods and then combine them into a new function.

  • @Summer9604
    @Summer9604 5 років тому +1

    In the last example .map() just felt like another .filter() , good video!

  • @douglasmiranda4756
    @douglasmiranda4756 5 років тому +7

    Many thanks for this. A good explanation!

  • @rishabhrao3661
    @rishabhrao3661 2 роки тому +1

    Amazing and concise

  • @rancidratd
    @rancidratd 3 роки тому

    finally, i understood how this works and for what, thank you!

  • @LonelyJester
    @LonelyJester 5 років тому +3

    very good explanation on the reduce!

  • @merlinafera4865
    @merlinafera4865 2 роки тому

    Free checker is an email logger your email list can be retrieved by the tools builder

  • @centaur26
    @centaur26 3 роки тому +1

    thank you heaps, wonderful video, clear and precise with a good example, filter,map and reduce doesnt scare me anymore..haha

  • @jeevanthalluri2200
    @jeevanthalluri2200 3 роки тому

    Great explanation.SHORT AND SMART AND SWEET AND SUPER

  • @SH-lt2iv
    @SH-lt2iv 4 роки тому +2

    very good examples thank you !

  • @santiagoortiz619
    @santiagoortiz619 4 роки тому +1

    This explanation is awesome! Thanks a lot!

  • @entrozone9680
    @entrozone9680 3 роки тому +1

    Thanks man,great explanation

  • @jorgemanzur198
    @jorgemanzur198 4 роки тому +2

    great explanation, thanks

  • @romesupaila1864
    @romesupaila1864 4 роки тому

    If it's passable or not in Multidimensional array map and reduce filter in lamda expression
    If it's passable how to do example

  • @MrFahimansari
    @MrFahimansari 3 роки тому

    Very nicely explained

  • @kieran2347
    @kieran2347 3 роки тому

    The explanation was good thanks

  • @balajikesavan9933
    @balajikesavan9933 3 роки тому

    Great explanation

  • @ТалантАсанкулов-ы2м

    Thank you for this lesson

  • @rambevara5702
    @rambevara5702 2 роки тому

    Fantastic

  • @sureshmg6786
    @sureshmg6786 5 років тому +2

    const appreciationArr = [
    {
    id: 1,
    msg: "All 3 methods explained very well,"
    },
    {
    id: 1,
    msg: " Thanks a lot!"
    },
    {
    id: 2,
    msg: "Good job "
    },
    {
    id: 2,
    msg: "and keep going!!"
    },
    ];
    const resultArr = appreciationArr
    .filter((item) => item.id === 1)
    .map((resItem) => resItem.msg)
    .reduce((item1, item2) => {
    return item1 + item2;
    });
    console.log(resultArr);

    • @TheCodeholic
      @TheCodeholic  5 років тому +1

      Love your comment man,
      Just item1 should probably be named as accumulator

    • @sureshmg6786
      @sureshmg6786 5 років тому

      @@TheCodeholic you mean like accumulator1, accumulator 2?

    • @TheCodeholic
      @TheCodeholic  5 років тому

      @@sureshmg6786 No, I mean accumulator, item.
      The first argument of the reduce's callback is accumulator and second argument is array element.
      developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce

  • @adambenson5098
    @adambenson5098 4 роки тому

    How do u view an output in the terminal of vscode????

    • @farhanrafi6709
      @farhanrafi6709 2 роки тому

      open terminal then type >> node filename.js >>then hit enter

  • @AkinBelieve
    @AkinBelieve 2 роки тому

    Could not get these to click. It just clicked. Thanks!

  • @pankajsharma-rf1ov
    @pankajsharma-rf1ov 3 роки тому

    such a good explanation 👌

  • @manishshrestha241
    @manishshrestha241 3 роки тому

    thanku sir ur heroo..

  • @AyushKumar-tp3bz
    @AyushKumar-tp3bz 4 роки тому

    Nice explanation

  • @pankajsharma-rf1ov
    @pankajsharma-rf1ov 3 роки тому

    awesome explanation

  • @ankush_in_sync5998
    @ankush_in_sync5998 3 роки тому

    Thank yōu sir

  • @Kingstar_officialboy
    @Kingstar_officialboy Рік тому

    We are new learners …… now here in 2023 ❤😢

  • @DawutMuhammetgurbanow
    @DawutMuhammetgurbanow 11 місяців тому

    why you arent working in console.. it is not look good to learn on your site

  • @geritoxnm
    @geritoxnm 2 роки тому

    I'm still as lost as I was before watching. I guess I need a break for my brain to work again...

  • @littleElmimo123
    @littleElmimo123 4 роки тому +1

    These weren’t real world examples.

  • @thantrunguc6320
    @thantrunguc6320 5 років тому

    Ai biết tiếng việt có thể vietsub lại được không? Tiếng anh của mình rất kém nên không thể hiểu được anh ấy nói gì . Please

  • @shahrozcheema4602
    @shahrozcheema4602 5 років тому +1

    i love uuuuuuuuuuuuuuuuuu

  • @PCEANANTHGUTTI
    @PCEANANTHGUTTI Рік тому

    bokkala cheppav
    \

  • @prasenjeet419
    @prasenjeet419 5 років тому +1

    Ur watch time would increase if u would just zoom in and make it easier for us to see what's going on in the screen. Or people would just stop watching ur vid midway like how I am leaving

    • @TheCodeholic
      @TheCodeholic  5 років тому +1

      Thanks for your comment. I am already doing this in my latest videos.

    • @alexmercer6585
      @alexmercer6585 4 роки тому

      I can see well and clear. See an eye doctor

    • @yoooyoyooo
      @yoooyoyooo 4 роки тому

      @@alexmercer6585 Only if the doctor is zoomable.