---
date: 2020-11-13
id: d8cdd418-4d65-4814-b362-9db4a6730030
title: Array.prototype.map()
---

# Description

`map()` creates a new array populated with the results of calling a
passed function on every element in the calling array.

# Syntax

``` javascript
const array = [1, 2, 3, 4];
const map1 = array.map((x) => x * 2);

console.log(map1); // [(2, 4, 6, 8)]
```
