filter Array Method | JavaScript Tutorial

Поділитися
Вставка
  • Опубліковано 4 січ 2025

КОМЕНТАРІ • 33

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

    Check out the other videos in the JavaScript Array Methods series: ua-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.

  • @apaarjain
    @apaarjain 4 місяці тому

    amazing usecases. thanks

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

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

    thanks. this helped me with my project 🙂

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

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

  • @rahman-thecomputerguy7045
    @rahman-thecomputerguy7045 4 роки тому +1

    Thanks you Florin for helping me understand these concepts 🙆

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

    Another excellent explanation, thanks Florin

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

    Thankyou Florin!

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

  • @Mst.NowshinYasmin
    @Mst.NowshinYasmin 4 роки тому

    thanks for sharing informative things

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

    Can't believe this is free😳

  • @user-rs7yu8nv5n
    @user-rs7yu8nv5n 4 роки тому

    Thank you sir

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

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

  • @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 8 місяців тому

    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.

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

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