---
title: "Discussion on \"Difference between forEach and map methods in JavaScript and how to use them in looping an Array\" | Hashnode"
description: "Discussion on \"Difference between forEach and map methods in JavaScript and how to use them in looping an Array\". In this article, we are going to understand the difference between the forEach and map methods in JavaScript. how to use them loop through an array and also which one to use depending on what you want to achieve. JavaScript has a different method of ..."
url: "https://hashnode.com/posts/difference-between-foreach-and-map-methods-in-javascript-and-how-to-use-them-in-looping-an-array/63cb71e2ca2beddd4379b14f"
---

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

Discussion

# [Difference between forEach and map methods in JavaScript and how to use them in looping an Array](https://jonuel.hashnode.dev/difference-between-foreach-and-map-methods-in-javascript-and-how-to-use-them-in-looping-an-array?utm_source=hashnode&utm_medium=feed)

In this article, we are going to understand the difference between the forEach and map methods in JavaScript. how to use them loop through an array and also which one to use depending on what you want to achieve. JavaScript has a different method of ...

Jan 21, 2023 · 3 min read · jonuel.hashnode.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#methods](https://hashnode.com/tag/methods)
-   [#map-vs-foreach](https://hashnode.com/tag/map-vs-foreach)
-   [#web-development](https://hashnode.com/tag/web-development)
-   [#reactjs](https://hashnode.com/tag/reactjs)

## Written by

[Emmanuel Uzoezie](https://hashnode.com/@jonuel)

@jonuel

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

i'm a frontend developer

I'm a frontend developer from Nigeria.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
