How to use map() filter() reduce() | JavaScript Array Methods Tutorial

Поделиться
HTML-код
  • Опубликовано: 9 янв 2025

Комментарии • 53

  • @danielgago-sk
    @danielgago-sk 3 месяца назад +13

    Any video from you is great. You present every function in detail and practically. If a person doesn't understand it after your video, he probably never will... Thanks

    • @coding2go
      @coding2go  3 месяца назад +2

      Thank you so much 🤗

  • @stombland
    @stombland 3 месяца назад +17

    the best... video on map, filter, reduce
    pls make one on async -> callbacks, promise,...

  • @Crystal100PX
    @Crystal100PX 2 месяца назад +2

    Hello, I am using a translator, well I speak Spanish not English, but I want to tell you that your videos taught me a lot, they are incredible and I have learned a lot

  • @rakeshshah5783
    @rakeshshah5783 Месяц назад

    I would say - You Rock the House Man.. You just finished within 12 minutes unbelievable with real time problem statement.. 100% useful video. Thank you so much from INDIA.. This video should be watch millions millions times...

  • @skellybobby6096
    @skellybobby6096 3 месяца назад +5

    bro please make a javascript full course like the html css course, it was the best course i have ever bought and i would 100% buy a javascript course from you

    • @LocksVid
      @LocksVid 2 месяца назад +1

      Facts dude

  • @jimmythepagina7989
    @jimmythepagina7989 12 дней назад

    man. this was sooooooooooooooo helpful. thank you so much - odin learner here 👽👽

  • @mahendrapratapsingh7384
    @mahendrapratapsingh7384 Месяц назад +1

    Greak work dude.. make lot more same videos on every javascript es6 dates concepts 👍🏻👌🏻

  • @surajr4757
    @surajr4757 Месяц назад

    Thanks for this amazing video brother!

  • @PicSta
    @PicSta 3 месяца назад +1

    Excellent tutorial!!! I must say by far the most high quality, precise one in web dev I have seen in a month. Please more JS/DOM related tutorials. Btw, which VSCode theme do you use? Looks pleasing on the eyes. Thanks in advance. Keep dev'ing!

    • @coding2go
      @coding2go  3 месяца назад

      Thanks for the kind words 💙 There will be more javascript videos (and dom) in the future. My VS Code theme is Palenight but in the video I am actually using a different app for coding. It's called RunJS, which is a simple javascript playground with integrated console. If I just want to try out a few code examples I use that app so that I don't have to setup an html file, open the browser console etc. For development I would not use it as it has very limited features but when I simply want to mess around with a little bit of js code, it is faster and simpler to use RunJS.

    • @PicSta
      @PicSta 3 месяца назад

      @@coding2go Thanks for your explanation. The theme looked well colored to me. I used Palenight for a while, but somehow switched to the GitHub Dark Theme.

  • @desmondqoza123
    @desmondqoza123 2 месяца назад

    You are good.. you are so very good. Thanks for the video - concise and easy to understand

  • @mhuzaifa6040
    @mhuzaifa6040 Месяц назад

    Thanks man ❤

  • @GonnaLoveThis
    @GonnaLoveThis 3 месяца назад +1

    may i have questions?🙇🏻‍♂️🙇🏻‍♂️
    6:43 no { }
    6:53 having { }
    when to have the difference to use { } or not?

    • @EyadMohamed-yn5py
      @EyadMohamed-yn5py 3 месяца назад +1

      He used short arrow function

    • @coding2go
      @coding2go  3 месяца назад +1

      This is the one-line arrow function that I explained at 2:44.
      You could write both examples in one line, but I decided to use an extra line because the &&- condition was too long.

    • @GonnaLoveThis
      @GonnaLoveThis 2 месяца назад

      @@coding2go thank you very much

    • @desmondqoza123
      @desmondqoza123 2 месяца назад

      You use curly braces when you have multiple statements in your return and you use brackets when you have more than one argument or parameter. If you have only one then you don't have to use them, but your code will work if you use them

  • @Holsfyre
    @Holsfyre 2 месяца назад

    Thank you so much! respect!

  • @kenechukwuwisdom8287
    @kenechukwuwisdom8287 3 месяца назад +3

    Pls make a playlist on DOM manipulation 🙏

  • @EyadMohamed-yn5py
    @EyadMohamed-yn5py 3 месяца назад +2

    Great video ❤ please install more js😅

  • @mykalimba
    @mykalimba 3 месяца назад +1

    0:30 This reference is not LOST on me.

  • @MamunurRoshid93
    @MamunurRoshid93 3 месяца назад

    Great tutorial

  • @southeanehem5707
    @southeanehem5707 3 месяца назад

    Thanks you so much for this precious video

  • @OCEMTechZone
    @OCEMTechZone 2 месяца назад

    Great🎉

  • @madhankumarselvarangam7835
    @madhankumarselvarangam7835 2 месяца назад

    Superb, fantastic 👏 👌 nice explanation. Post videos on es6 features indetail 🎉

  • @misa1692
    @misa1692 2 месяца назад

    Hola hola... Are you using an extension to see the log outputs?

  • @riufq
    @riufq 3 месяца назад +1

    Is there any explanation, regarding those 3 parameter?
    Like what's arr, i, price means?
    Im still new

    • @coding2go
      @coding2go  3 месяца назад +1

      You could watch my video on the foreach method to find out what these parameters do. They work the same in all of these methods. Hope that helps ✌️

    • @riufq
      @riufq 3 месяца назад

      @@coding2go thanks

    • @desmondqoza123
      @desmondqoza123 2 месяца назад

      Hi, you remind me of me - don't stress, it will get better with time. Remember that parameters are sometimes referred to as arguments. For every parameter remember that - it is [ data - (information you have to give) ] that you have to pass(give) in your function for that parameter or argument. Remember that in javascript [ arr ] is short or shortcut for array and [ i ] is short for index(you will find [ i ] or [ index ] are part of all arrays. Always remember when working with arrays that an array stores data that is supposed to be a list of things(data). For an example: when you are working with an array of numbers // const numbers = [ 2, 6, 7, 10, 43 ], you will be using [ num or n for number not numbers ] - to pass data to that [ index(specific) parameter or argument of (num or n) ], hence price not prices because you are referring to a specific index or [ i ] of that array - a specific element of an array... // const prices = [ 3, 6, 7, 9, 23, 78 ] //
      prices.map(price => price * 0.5). Explanation of prices.map - go through prices array. Explanation of price inside brackets - use a single price of an array.
      Explanation of price * 0.5 after =>(arrow) - use that price( index or [ i ] ) and multiply it by 0.5. I hope it helps.. but believe me, it will get better with time. Hola, from Desmond from South Africa.

  • @CODE_WITH_FRED
    @CODE_WITH_FRED 3 месяца назад +1

    Can you do a tutorial on function and Dom please 😊😊😊

  • @JulyFranzClaridad-p5p
    @JulyFranzClaridad-p5p 3 месяца назад

    can you create a tutorial on how to properly use the css units such as, rem, em, % and px, pls

  • @Igloo12-o1w
    @Igloo12-o1w 3 месяца назад +1

    can u make a tutorial on JS

    • @98f5
      @98f5 3 месяца назад

      This is a tutorial on js. How about can u make more on ts lol

  • @NoNeedForRandomNumbers
    @NoNeedForRandomNumbers 3 месяца назад +6

    Laptop is cheaper than smartphone 😂

    • @Tozu25
      @Tozu25 3 месяца назад +4

      Well, it depends?

    • @healthadvice3091
      @healthadvice3091 2 месяца назад

      ithink if you do know how to build pc, pc will be cheaper than those 2 but with higher specs, but the cons is you cant bring it anywhere 😢

  • @JustinByrne1337
    @JustinByrne1337 3 месяца назад

    What software is being used here?

    • @coding2go
      @coding2go  3 месяца назад +1

      I am using RunJS, which is just a simple javascript playground with integrated console. If I just want to try out a few code examples I use that app so that I don't have to setup an html file, open the browser console etc.

  • @Alexander-ku4gi
    @Alexander-ku4gi 2 месяца назад

    when next video about find method and etc?

  • @K.Tamilarasu-g4g
    @K.Tamilarasu-g4g 3 месяца назад

    If l join as a member can l get Access to all videos

    • @coding2go
      @coding2go  3 месяца назад +1

      Yes you will. Our "members-only" videos are the individual lessons from our html css udemy course uploaded on RUclips. By joining you unlock every video on this channel.

  • @AlThePal78
    @AlThePal78 2 месяца назад

    I never really used filter I think it might be a little better then map and can server the same purpose. I hate reduce I always get that confused. Map is better but filter according to this video

  • @AMCW_T
    @AMCW_T 3 месяца назад +1

    Make js course

  • @danser_theplayer01
    @danser_theplayer01 3 месяца назад +2

    Just so you know, the best way to use filter and reduce and forEach etc. is to not.
    Don't use them.
    Use a loop.
    Loops will seriously uncomplicate your code. Half of these methods need a callback that looks the same but does different things, and all of them are slower than a loop (and I hate slow websites).

  • @mr.k8660
    @mr.k8660 3 месяца назад

    Awesome . I'm super grateful that I know this now !

    • @coding2go
      @coding2go  3 месяца назад

      Glad I could help!

  • @ghostdocter9006
    @ghostdocter9006 3 месяца назад

    Need dsa in python.

  • @jimmythepagina7989
    @jimmythepagina7989 12 дней назад

    --