Eugene Zolotarenko Profile picture
Indie Maker 🫡 Growing https://t.co/AxXWrvJqr7 to $5M ARR

Nov 22, 2021, 10 tweets

7 JavaScript Array methods which you 104% must know! 🤨🤨🤨

👇 Follow Thread 🧵

1. array.map()

Using map(), we can iterate through all items in an array, taking actions on each one. The result of this operation is provided as a new array.

2. array.filter()

Using filter(), we can iterate through all items in an array and filter them depending on conditions inside a method. The result of this operation is provided as a new array.

3. array.find()

Using find(), we can iterate through all items in an array and find the first one which meets conditions inside a method. The result of this operation is provided as a single item.

4. array.some()

Using some(), we can iterate through all items in an array and check if at least one of them meets conditions inside a method. The result of this operation is provided as a boolean value.

5. array.every()

Using every(), we can iterate through all items in an array and check if all of them meet conditions inside a method. The result of this operation is provided as a boolean value.

6. array.sort()

Using sort(), we can sort items inside an array by conditions inside a method. The result of this operation is provided as the same array (NOT NEW ARRAY).

7. array.reduce()

Using reduce(), you can do a lot of useful array manipulations. This method performs a concrete accumulative operation on its items to calculate a result value.

That's all folks! 🔥🧯

If you found this thread useful, please consider following @eugZolotarenko and retweeting the first tweet. 📢

Back to the Top! 👇

Share this Scrolly Tale with your friends.

A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.

Keep scrolling