---
title: "Discussion on \"why to use JavaScript map() ?\" | Hashnode"
description: "Discussion on \"why to use JavaScript map() ?\". Map function is used to applying the some operation on each element in the array and return the new array .\nOriginal array is not modified instead a new array is returned .\nSimple map()\nOk here is a simple example to apply a discount on all the items..."
url: "https://hashnode.com/posts/why-to-use-javascript-map/602e5c64bfecab23c35245e2"
---

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

Discussion

# [why to use JavaScript map() ?](https://yatheesh.hashnode.dev/why-to-use-javascript-map?utm_source=hashnode&utm_medium=feed)

Map function is used to applying the some operation on each element in the array and return the new array . Original array is not modified instead a new array is returned . Simple map() Ok here is a simple example to apply a discount on all the items...

Feb 18, 2021 · 3 min read · yatheesh.hashnode.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#web-development](https://hashnode.com/tag/web-development)

## Written by

[Yatheesh](https://hashnode.com/@yatheesh)

@yatheesh · India

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

Engineer . Web Developer and more .

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
