8 Must Know JavaScript Array Methods



Working with arrays in JavaScript used to be a pain with barely any support for complex array operations. Fast forward to today, though, and there are tons of amazing JavaScript array methods available to us. In this video I will be covering the 8 most important array methods in JavaScript.

Timestamps

0:00 – Introduction
0:20 – filter
1:58 – map
2:54 – find
3:42 – forEach
4:30 – some
5:50 – every
6:27 – reduce
8:51 – includes

Twitter:
https://twitter.com/DevSimplified

GitHub:
https://github.com/WebDevSimplified

CodePen:
https://codepen.io/WebDevSimplified

#JavaScript #WebDevelopment #Array

43 Comments

  1. When learning Javascript you start to learn 10 percent then…. 5 years later you finish with the last 20 percent of knowledge.. Good stuff mate

  2. I have always wondered what performance gain there will be if instead of
    arr.every(… x < y) — which will require going through the entire array to determine the case
    you use
    !arr.some(… x > y) — will only need to find one that breaks the case – worst scenario is, the last entry is the breaker – best case the first is the breaker.
    Notice the negation for 'some' and the reversal of the operator < to > or > to <.

  3. Doesn't seem to have any syntax that works for me. I get an empty array for this. [0], oops I mean array 0, well any how nowt.

  4. hey bro! I have been watching your tutorials from past few years but i have bad understanding in JavaScript if you could make a video for what purpose we use javaScript array method where we actually use it.

  5. Man this was just amazing. You explain it with such simplicity without complicating and confusing the viewer. Thanks man

  6. What's the difference between includes and some?

    Also, for reduce method, if the second argument is omitted, the method takes the first and second array items as current and item respectively. Just an FYI.

  7. Funny how much more helpfully and clear this is about these methods over some tutorials that spend 30 to 45 on each method

Leave a Reply

© 2023 53GB