---
title: "Discussion on \"The Map Function in JavaScript\" | Hashnode"
description: "Discussion on \"The Map Function in JavaScript\". Hi guys !.\nIn this post we will learn how to use the Map Function in JavaScript. This particular function is very useful because not only can you map an array of objects, but also map elements.\n\nWhat is map() ?\nIn simple terms, the map function calls..."
url: "https://hashnode.com/posts/the-map-function-in-javascript/61eabae80b35507a93a0487a"
---

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

Discussion

# [The Map Function in JavaScript](https://saleh.hashnode.dev/the-map-function-in-javascript?utm_source=hashnode&utm_medium=feed)

Hi guys !. In this post we will learn how to use the Map Function in JavaScript. This particular function is very useful because not only can you map an array of objects, but also map elements. What is map() ? In simple terms, the map function calls...

Jan 15, 2022 · 2 min read · saleh.hashnode.dev  
Read the article

## Written by

[Saleh Mubashar](https://hashnode.com/@Saleh28)

@Saleh28 · Jeddah, SA

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

Web Developer

Frontend Developer React

## Responses 1

Markdown supported · ⌘↵ to post

[Mahesh](https://hashnode.com/@urstrulyvishwak)

[Jan 21, 2022](https://hashnode.com/posts/the-map-function-in-javascript/61eabae80b35507a93a0487a/comment/61eabf1a540e877a6c00c01a)

Nice Article.

**Suggestion:** Recommended to use `forEach` in your first example as you are not returning anything from array.
