---
title: "Discussion on \"closures || map method || arguments || map method how internally works\" | Hashnode"
description: "Discussion on \"closures || map method || arguments || map method how internally works\". var map = function(arr, fn) {\n    let n=arr.length;\n    let arr2=[];\n    for(let i=0;i<n;i++){\n//here we can call this function with 0 || 1 || 2 no of arguments\n        arr2.push(fn(arr[i],i));\n    }\n    return arr2;\n\n};\n\nfunction arguments behavior ..."
url: "https://hashnode.com/posts/closures-map-method-arguments-map-method-how-internally-works/6494584d64dcf79304b9651e"
---

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

Discussion

# [closures || map method || arguments || map method how internally works](https://bishalthesoftwareengineer.hashnode.dev/closures-map-method-arguments-map-method-how-internally-works?utm_source=hashnode&utm_medium=feed)

var map = function(arr, fn) { let n=arr.length; let arr2=\[\]; for(let i=0;i<n;i++){ //here we can call this function with 0 || 1 || 2 no of arguments arr2.push(fn(arr\[i\],i)); } return arr2; }; function arguments behavior ...

Jun 22, 2023 · 1 min read · bishalthesoftwareengineer.hashnode.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#functions](https://hashnode.com/tag/functions)
-   [#js](https://hashnode.com/tag/js)
-   [#map](https://hashnode.com/tag/map)

## Written by

[BISHAL DATTA](https://hashnode.com/@TheJSLearner)

@TheJSLearner

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

Feeding,Building myself to get a better devoloper,,,engineer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
