JavaScript Array Filter

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

КОМЕНТАРІ • 68

  • @kikevanegazz325
    @kikevanegazz325 3 роки тому +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!

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

    best realtime example

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

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

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

  • @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 3 роки тому +2

      Javascript has 2 kinds of zeros positive and negative.

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

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

    • @shibshankarpadhy783
      @shibshankarpadhy783 3 роки тому +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 3 роки тому +3

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

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

    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 ;)

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

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

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

      first video but clearer than my udemy current course

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

    You're the man, Mosh.

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

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

    Excellent explanation Thanks

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

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

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

    All time champ:) keep up the great work

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

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

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

    Thank You Very Much for clearly explaining

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

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

    only one word thank you very much

  • @danchuzhov6445
    @danchuzhov6445 2 роки тому +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?

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

    Incredibly helpful!

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

    Awesome video. Danke Schoen.

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

    Amazing mosh

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

    What themedo you use?

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

    Short & sweet.

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

    thanks for the tip.

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

    Nice video my man, keep it up.

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

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

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

    Thanks a lot bro!

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

    Thanks a lot for this

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

    thanks man

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

    youre very useful

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

    Amazing. Love it

  • @abhineveash
    @abhineveash 3 місяці тому

    Awesome ❤

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

    Nice sir

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

    Excellent

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

    Thank you!

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

    love you, thanks!

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

    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?

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

    you're the best

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

    so good, always great

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

    excellent , subsribed for life ♥ ♥ ♥ ♥

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

    thanks so much

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

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

    Tnx mn keep going

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

    Awesome

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

    Thank you :-)

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

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

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

    wow man

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

    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 6 років тому +1

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

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

    Thank you so much.