Skip to content

JavaScript Array Methods

map, filter, reduce and other array higher-order methods

intermediate
Question 1 of 8
Question 1 of 8javascript

What does the following code output? const arr = [1, 2, 3] console.log(arr.map(x => x * 2))

javascript
const arr = [1, 2, 3]
console.log(arr.map(x => x * 2))