---
title: "Comment by Mahesh on \"The Map Function in JavaScript\" | Hashnode"
description: "Nice Article. Suggestion: Recommended to use forEach in your first example as you are not returning anything from array."
url: "https://hashnode.com/posts/the-map-function-in-javascript/61eabae80b35507a93a0487a/comment/61eabf1a540e877a6c00c01a"
---

[Discussion](https://hashnode.com/posts/the-map-function-in-javascript/61eabae80b35507a93a0487a)

Comment [The Map Function in JavaScript](https://hashnode.com/posts/the-map-function-in-javascript/61eabae80b35507a93a0487a)

[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.
