JavaScript Array Filter

Поділитися
Вставка
  • Опубліковано 14 тра 2018
  • JavaScript Array Filter
    🔥Get the COMPLETE course (83% OFF - LIMITED TIME ONLY): bit.ly/2M1sp4B
    Subscribe for more videos:
    / @programmingwithmosh
    Want to learn more from me? Check out my blog and courses:
    programmingwithmosh.com
    / programmingwithmosh
    / moshhamedani

КОМЕНТАРІ • 67

  • @kikevanegazz325
    @kikevanegazz325 2 роки тому +11

    Bro, I love your videos. I'm barely learning JS, and I must say that out of the many Tubers I watch, you're the one I understand best!

  • @TechMentors-PK
    @TechMentors-PK 5 років тому +13

    All time champ:) keep up the great work

  • @yasarhussain3811
    @yasarhussain3811 4 роки тому +12

    best realtime example

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

    Love this! Thank you for making it look easy!!!

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

    Thanks, I live in Belarus and your lesson helped me )

  • @clintona1855
    @clintona1855 3 роки тому +3

    You're the man, Mosh.

  • @danchuzhov6445
    @danchuzhov6445 Рік тому +1

    Thanks! What VS Code extension shows you filer method's syntax? And could you explain more complex case with full stack of filter's parameters - counter, array and thisObj?

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

    Thank You Very Much for clearly explaining

  • @gtslikemike4649
    @gtslikemike4649 6 років тому +2

    Awesome video. Danke Schoen.

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

    As my fist week of studying JS, Ive been stuck on this all day, You gave me the solution I was looking for ! Thanks a lot ;)

  • @RethinkingUI
    @RethinkingUI 6 років тому +1

    Excellent explanation Thanks

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

    Incredibly helpful!

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

    Hi Mosh i am a ui developer with 2years of experience could you please suggest on filter more tutorial, i am also getting confused with arrow function

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

    Dear Mosh. I am seeking a tutorial on Modular or Class Design in Javascript, do you have these lectures available for free or do you have a course regarding the different types of Modular/Class design in Javascript ?

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

    tanks a lot sir.i watched a video that has 30 minutes and i don't understand that concept but i understande your video in 3 minuts

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

    Thanks a lot bro!

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

    This video was really good at explaining the straight forward array. You ended the video with a possible application, but not how to build said application being that the Yelp example would use either an array of objects or nested array. If you have an array of businesses with various businesses hours and you're looking for businesses that are open at a particular (filtered) time, the script would have to pass through the array of businesses and then through the subset of hours, correct? Will you be making a video on how to do just that or am I missing something? Either way, like I mentioned, really good video.

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

      I would really want to know that as well, its sounds a bit more complex

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

      i think here more like objects of array will be used for businesses......and in callback function using conditions checking firstly time if time matches need then check if business open or close
      //object of arrays will look something like this
      // const array = [ {status:open , hour: 8PM to 10PM} , {status:close , hour:10PM to 1AM} ];
      //Now checking condition in callback function
      if(ArraYElement.hour > specificed time)
      {
      if(ArrrayElemenr.open == "open" )
      {return true}
      };
      Not really sure if it is correct but this is what i think

  • @musacj
    @musacj 6 років тому +2

    Thanks for this tutorial and great explanation.
    Please note: 0 is not a positive number or negative number. At 0:13 you mentioned you want to return only the positive numbers but your filter expression is "n => n >= 0", instead of "n => n > 0"

    • @shibshankarpadhy783
      @shibshankarpadhy783 2 роки тому +2

      Javascript has 2 kinds of zeros positive and negative.

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

      @@shibshankarpadhy783 well I didn't know that. I was commenting in terms of mathematical context

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

      I am so shocked that you replied after 3 years😂
      You should look into the topic of positive and negative zeros. Apparently if you divide any number with -0 it tends to -Infinity and if you divide by +0 it tends to +Infinity and that is the main reason behind having two zeros.

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

      @@shibshankarpadhy783 hehehehe, I'm still alive... covid-# still hasn't taken me ;-)
      Thanks for the info

  • @tommih86
    @tommih86 6 місяців тому

    Thank you!! Very informational. What kind of theme you are using in VS Code? Looks cool

  • @arbazkhan-od9sk
    @arbazkhan-od9sk 5 років тому

    only one word thank you very much

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

    Nice video my man, keep it up.

  • @alijouini4437
    @alijouini4437 6 років тому +3

    excellent , subsribed for life ♥ ♥ ♥ ♥

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

    Short & sweet.

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

    Mosh you are the best tech teacher . PhD of Software engineering

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

      first video but clearer than my udemy current course

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

    so good, always great

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

    Amazing. Love it

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

    What themedo you use?

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

    Thanks a lot for this

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

    thanks for the tip.

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

    love you, thanks!

  • @ebuks4ever
    @ebuks4ever 8 місяців тому

    Thank you so much.

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

    Amazing mosh

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

    What if I selected multiple criterions, for example, on Yelp you click on 'Open Now' and also wanted to filter based on cost, and now I just wanted to see objects with low cost that are open right now? What is the best execution for this or would I have to add another array method to support the filter array in this algorithm?

  • @LucasOliveira-kq7ud
    @LucasOliveira-kq7ud 2 роки тому

    And if I have a lot of characters inside a array, for example ['a', '~', 'p', '8', '/' ] and I only want the letters and the numbers?
    Does this method works?

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

    Sir, suppose I have script like this:
    var leaveFilter = data.filter(data => {return data[1 == "Annual Leave" || data[1] == "Vacation leave" || data[1] == "Sick" || data[1] == "Important leave"});
    How if I want make some iteration, or loop perhaps, so I just have to make that filter in array like this:
    filters = [ "Annual Leave", "Vacation leave", "Sick", "Important leave"]
    Which later I want that I could use that filters variable to do some iteration/loop in filter method above. Could you help to break this problem?

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

      ask this on facebook dude. Many javascript groups that can help, wish i could help but am learning too.

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

      @@andresviveros3994 thanks Man. Good idea :)

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

    Thank you!

  • @maxamedcabdi3378
    @maxamedcabdi3378 6 років тому

    Tnx mn keep going

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

    thanks so much

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

    youre very useful

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

    Excellent

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

    What’s the name of this plugin, which shows popup with info of “filter”?

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

      It's not a plugin, it comes by default on Visual Studio Code.

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

    thanks man

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

    Thank you :-)

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

    you're the best

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

    Nice sir

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

    Awesome

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

    Y'all already know most of us are here to pass the coding boot camp assessment. lol

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

    wow man

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

    Pure

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

    ang galing mong kalbo ka

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

    Ravish kumar official

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

    Nonsense function , source of a bunch of errors

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

    i love your content but hate the way you promote yourself by these ads