---
title: "Discussion on \"Array.prototype.map() & Array.prototype.forEach()\" | Hashnode"
description: "Discussion on \"Array.prototype.map() & Array.prototype.forEach()\". You must have used map() and forEach() for at least a 100 times but do you know the differences between these two higher order functions of JavaScript? Don't worry I got you covered.\nFirst let's talk about higher order functions.\nDon't go too deep in..."
url: "https://hashnode.com/posts/arrayprototypemap-and-arrayprototypeforeach/628555b483966a1653f13307"
---

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

Discussion

# [Array.prototype.map() & Array.prototype.forEach()](https://annukul.hashnode.dev/arrayprototypemap-and-arrayprototypeforeach?utm_source=hashnode&utm_medium=feed)

You must have used map() and forEach() for at least a 100 times but do you know the differences between these two higher order functions of JavaScript? Don't worry I got you covered. First let's talk about higher order functions. Don't go too deep in...

May 18, 2022 · 3 min read · annukul.hashnode.dev  
Read the article

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

## Written by

[Annukul Thakran](https://hashnode.com/@annukul03)

@annukul03

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

Frontend engineer playing with "things"

I am a full-stack developer with a passion for building innovative and engaging web applications. With expertise in JavaScript, ReactJS, Next.js, Elixir, PostgreSQL, and Node.js. My background in software development has taught me the importance of collaboration, communication, and problem-solving.

## Responses 1

Markdown supported · ⌘↵ to post

[Ayodele Samuel Adebayo](https://hashnode.com/@unclebigbay)

[May 20, 2022](https://hashnode.com/posts/arrayprototypemap-and-arrayprototypeforeach/628555b483966a1653f13307/comment/628727448b33cc3f1f48b651)

Good and straightforward explanation [Annukul Thakran](https://hashnode.com/@annukul03).

I'll also add that the `forEach()` function returns `undefined` by default and not chainable by nature i.e `forEach().then(=>{})` will return undefined.

[Annukul Thakran](https://hashnode.com/@annukul03)

[May 20, 2022](https://hashnode.com/posts/arrayprototypemap-and-arrayprototypeforeach/628555b483966a1653f13307/comment/628727448b33cc3f1f48b651#reply-6287397e7b02ca162edb01d9)

Thanks a lot for pointing that out. Have a great day man!
