---
title: "Discussion on \"JavaScript Array Methods  ( Map, Filter, ForEach)\" | Hashnode"
description: "Discussion on \"JavaScript Array Methods  ( Map, Filter, ForEach)\". Array Methods. What are they? How do they work? How do I use them? I will cover all of it in this post.\nBefore we start I would like to give you a brief summary of methods in JS\nWhat is a method  in Javascript?\nA method is a function which is a prope..."
url: "https://hashnode.com/posts/javascript-array-methods-map-filter-foreach/5f397a30c4d5973f55c91218"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [JavaScript Array Methods ( Map, Filter, ForEach)](https://blog.rohilpinto.com/javascript-array-methods-map-filter-foreach?utm_source=hashnode&utm_medium=feed)

Array Methods. What are they? How do they work? How do I use them? I will cover all of it in this post. Before we start I would like to give you a brief summary of methods in JS What is a method in Javascript? A method is a function which is a prope...

Aug 16, 2020 · 3 min read · blog.rohilpinto.com  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#array](https://hashnode.com/tag/array)
-   [#array-methods](https://hashnode.com/tag/array-methods)
-   [#es6](https://hashnode.com/tag/es6)
-   [#frontend-development](https://hashnode.com/tag/frontend-development)

## Written by

[Rohil](https://hashnode.com/@Rohil)

@Rohil · India

  
[View profile](https://hashnode.com/@Rohil)

Front-End Web Developer

Hello, I'm Rohil, a skilled web developer from India specializing in front-end development. Currently working with namedrop.io, my focus is on crafting seamless online experiences

## Responses 5

Markdown supported · ⌘↵ to post

[Usman Sabuwala](https://hashnode.com/@usmanwrites)

[Aug 21, 2020](https://hashnode.com/posts/javascript-array-methods-map-filter-foreach/5f397a30c4d5973f55c91218/comment/5f400e24004ed8653f47cb27)

Awesome! Looking forward for some nice posts like this one! 👍

[Rohil](https://hashnode.com/@Rohil)

[Aug 22, 2020](https://hashnode.com/posts/javascript-array-methods-map-filter-foreach/5f397a30c4d5973f55c91218/comment/5f400e24004ed8653f47cb27#reply-5f40e2b1cce6c969208c9e6a)

Thank you max 💛

[Chris Bongers](https://hashnode.com/@dailydevtips)

[Aug 17, 2020](https://hashnode.com/posts/javascript-array-methods-map-filter-foreach/5f397a30c4d5973f55c91218/comment/5f3a490f0801bf3f76e607c0)

Well written, always nice to see people using these methods.

Do keep in mind, depending on the array a native for loop can actually be the quicker/faster solutions. Especially filter and map can be pretty heavy according to some tests i've seen.

[Rohil](https://hashnode.com/@Rohil)

[Aug 17, 2020](https://hashnode.com/posts/javascript-array-methods-map-filter-foreach/5f397a30c4d5973f55c91218/comment/5f3a490f0801bf3f76e607c0#reply-5f3a56cac4d5973f55c91b41)

Thank you. Also, i didn't know that thanks for letting me know :)

[Bolaji Ayodeji](https://hashnode.com/@bolajiayodeji)

[Aug 17, 2020](https://hashnode.com/posts/javascript-array-methods-map-filter-foreach/5f397a30c4d5973f55c91218/comment/5f3a0ef8c4d5973f55c916bf)

This is insightful, thanks for sharing!

A quick tip: You should add your code using code snippets rather than adding images. It's a better experience with syntax highlighting and great for SEO.

```
let filter = [10,10,20,30,50];

console.log(filter)
```

Append three backticks to achieve this like so:

![Screenshot 2020-08-17 at 5.59.45 AM.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1597640403453/SDm-EL5Qq.png)

[Rohil](https://hashnode.com/@Rohil)

[Aug 17, 2020](https://hashnode.com/posts/javascript-array-methods-map-filter-foreach/5f397a30c4d5973f55c91218/comment/5f3a0ef8c4d5973f55c916bf#reply-5f3a275a0801bf3f76e6055b)

Yes, I will do that in my next post. I thought adding images would look good. I guess I have to change my approach :D Thanks a lot 😃

[Bolaji Ayodeji](https://hashnode.com/@bolajiayodeji)

[Aug 17, 2020](https://hashnode.com/posts/javascript-array-methods-map-filter-foreach/5f397a30c4d5973f55c91218/comment/5f3a0ef8c4d5973f55c916bf#reply-5f3a87830801bf3f76e60ac2)

You can actually edit this article and make the change if you want. [Rohil](https://hashnode.com/@Rohil)

[Rohil](https://hashnode.com/@Rohil)

[Aug 17, 2020](https://hashnode.com/posts/javascript-array-methods-map-filter-foreach/5f397a30c4d5973f55c91218/comment/5f3a0ef8c4d5973f55c916bf#reply-5f3a89edc4d5973f55c91d55)

Yes i know but it will take some time & I am a bit too lazy haha😅 [Bolaji Ayodeji](https://hashnode.com/@bolajiayodeji)

[Preetika Taneja](https://hashnode.com/@preetika00)

[Aug 16, 2020](https://hashnode.com/posts/javascript-array-methods-map-filter-foreach/5f397a30c4d5973f55c91218/comment/5f397b44c4d5973f55c91245)

Great job! keep going! 👍💥

[Rohil](https://hashnode.com/@Rohil)

[Aug 16, 2020](https://hashnode.com/posts/javascript-array-methods-map-filter-foreach/5f397a30c4d5973f55c91218/comment/5f397b44c4d5973f55c91245#reply-5f397c2fc4d5973f55c9127c)

Thank you preetika 💛

[Aman Tyagi](https://hashnode.com/@aman__tyagi)

[Aug 16, 2020](https://hashnode.com/posts/javascript-array-methods-map-filter-foreach/5f397a30c4d5973f55c91218/comment/5f397b330801bf3f76e5ff95)

It was a nice read about JavaScript Array methods pretty informative, Well done man awesome, Keep going doing well

[Rohil](https://hashnode.com/@Rohil)

[Aug 16, 2020](https://hashnode.com/posts/javascript-array-methods-map-filter-foreach/5f397a30c4d5973f55c91218/comment/5f397b330801bf3f76e5ff95#reply-5f397c6ec4d5973f55c91289)

Thanks a lot, aman. I'll be waiting for yours as well :D
