filter Array Method | JavaScript Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 11 ม.ค. 2025

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

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

    Check out the other videos in the JavaScript Array Methods series: th-cam.com/play/PLgBH1CvjOA62PBFIDq55-S6Beivje30A2.html

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

    That is a clever way of removing duplicates using the filter method Florin. I've never seen it done that way. I writing that down haha.

    • @FlorinPop
      @FlorinPop  4 ปีที่แล้ว

      Better do it with Set 😆

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

      @@FlorinPop Yeah that's how I do it usually, but I like to know multiple ways of doing the same thing as you well know haha

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

    Thank you sir for the last use case of filter method(removing duplicates),i never thought it that way,thanks for the eye opener.

    • @FlorinPop
      @FlorinPop  4 ปีที่แล้ว

      Your welcome. Although whenever you want to remove duplicates, I’d suggest you use Set.

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

    Thank you! Just what I needed.

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

    thanks. this helped me with my project 🙂

  • @apaarjain
    @apaarjain 5 หลายเดือนก่อน

    amazing usecases. thanks

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

    Great video, I only have 1 question. In 2:30 where did the "person" variable come from?

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

      Do you know the answer to this? I'm just starting out and I'm SO confused by this concept...

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

      ​@@PD_Patrice person is the argument passed to the function that will be executed for each element of the people array, and it represents each individual element of the array during each iteration. You can just name it anything you like though.

  • @donaldbrown111
    @donaldbrown111 4 ปีที่แล้ว

    Another excellent explanation, thanks Florin

  • @rahman-thecomputerguy7045
    @rahman-thecomputerguy7045 4 ปีที่แล้ว +1

    Thanks you Florin for helping me understand these concepts 🙆

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

      Do you understand JavaScript now?

  • @justb3m184
    @justb3m184 4 ปีที่แล้ว

    Thankyou Florin!

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

    How you are outputting console.log in terminal? Is there any extension for it? Thank you for the video.

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

      I use nodemon to run the script on saving the file.

    • @JSBangladesh
      @JSBangladesh 4 ปีที่แล้ว

      Florin Pop Thank you much man! Best of luck for the future.

  • @Mst.NowshinYasmin
    @Mst.NowshinYasmin 4 ปีที่แล้ว

    thanks for sharing informative things

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

    Salutare. de ce la minutul 3:45 (apx), in linia 3 ai scris ' nums', si nu Numbers? Inteleg rezultatul unde trebuie sa duca codul, dar nu inteleg de ce trebuie scris asa.

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

    I guess the reason its not common to use filter for removing duplicates is that it involves nesting an indexOf loop inside a filter loop, which maybe considered a bad practice for time complexity.

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

      Yup. Plus it’s easier with Set

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

      Good because that last part was a little confusing.

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

    Can't believe this is free😳

  • @oussKhayi
    @oussKhayi 3 ปีที่แล้ว

    Only 133k subscribers !!!!!?..!!
    Hoooow 💔😪
    U deserve 1M ond more++ 👑

  • @user-rs7yu8nv5n
    @user-rs7yu8nv5n 4 ปีที่แล้ว

    Thank you sir

  • @ferrr5124
    @ferrr5124 3 ปีที่แล้ว

    hey. Thanks for the explanation! Its being super helpful for a beginner like me :) One question, where did you get "person" from? There is no person in the adults arrays, so im trying to understand how to access person.age, if there's no person. Thank you!

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

      Do you understand JavaScript yet?

  • @AllahomAnsorGaza
    @AllahomAnsorGaza 3 ปีที่แล้ว

    Hello Florin pop
    thx for your video
    but i want ask if i have array of objects and i want get the duplicate objects with filter function how i can do it

  • @momakplayz7985
    @momakplayz7985 3 ปีที่แล้ว

    hey florin, i dont undersetand the third part of value, index, arr part and i dont know what to do

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

    create a full javascript searies bro your video is is such a great.but create video with this method as you apply in this video.

  • @aaronargottelopez3488
    @aaronargottelopez3488 4 ปีที่แล้ว