JavaScript 2025 · Arrays

Transform every item

Create a new array by applying a function to each item.

const doubled = numbers.map((n) => n * 2);

Official JavaScript 2025 documentation

More arrays commands

All arrays commands · JavaScript 2025 cheatsheet

Was this page helpful?