---
title: "Comment by Akash Raj on \"Javascript Array Methods\" | Hashnode"
description: "I think there is a mistake in the 1st code which you have provided which is for map() method. Where you have written code for anonymous fn call in the return st"
url: "https://hashnode.com/posts/javascript-array-methods/64c50d5c74665a058d53d3dc/comment/64db36b66203e95780d6566a"
---

[Discussion](https://hashnode.com/posts/javascript-array-methods/64c50d5c74665a058d53d3dc)

Comment [Javascript Array Methods](https://hashnode.com/posts/javascript-array-methods/64c50d5c74665a058d53d3dc)

[Akash Raj](https://hashnode.com/@Akash161)

[Aug 15, 2023](https://hashnode.com/posts/javascript-array-methods/64c50d5c74665a058d53d3dc/comment/64db36b66203e95780d6566a)

I think there is a mistake in the 1st code which you have provided which is for map() method. Where you have written code for anonymous fn call in the return statement you are multiplying current element of array with 3 so the output would be \[ 3, 6, 9, 12, 15 \].

[Dumebi Okolo](https://hashnode.com/@DumebiO)

[Aug 15, 2023](https://hashnode.com/posts/javascript-array-methods/64c50d5c74665a058d53d3dc/comment/64db36b66203e95780d6566a#reply-64db37584429385b92800edb)

Hello 👋 Thank you for your observation. However, in the first code, the return statement had `return x*2`, which means that the elements in the array were multiplied by 2.

[Akash Raj](https://hashnode.com/@Akash161)

[Aug 15, 2023](https://hashnode.com/posts/javascript-array-methods/64c50d5c74665a058d53d3dc/comment/64db36b66203e95780d6566a#reply-64db59f46203e95780d65b1f)

But where you have used the arrow function it has x\*3 as the return statement right, so it will print multiple of 3 in the new array.

[Chidiadi Anyanwu](https://hashnode.com/@chidiadi01)

[Aug 29, 2024](https://hashnode.com/posts/javascript-array-methods/64c50d5c74665a058d53d3dc/comment/64db36b66203e95780d6566a#reply-66d08d97834752aa932be3d3)

[Dumebi Okolo](https://hashnode.com/@DumebiO) you actually wrote x\*3 in the second example. The anotherNumbersArray constant. That's what he's trying to say.
