The `map()` method creates a new array by applying a function to each element of an existing array. The callback’s return value becomes the corresponding value in the new array, while the original array is normally left unchanged.
For example, `[1, 2, 3].map(x => x * 2)` produces `[2, 4, 6]`. The callback receives the current element and may also receive its index and the array being traversed. The returned array has the same number of positions as the source array, although sparse-array behavior can preserve empty slots.
`map()` is often confused with neighboring array methods. `filter()` creates a shorter array containing elements that pass a test. `reduce()` combines elements into one accumulated result, such as a sum. `forEach()` runs a function for side effects but returns `undefined`, so it is not the usual choice when a transformed array is needed.
Because `map()` returns a new array, it fits naturally into chained data transformations. It is not inherently asynchronous: if its callback performs asynchronous work, the result is typically an array of promises rather than automatically awaited values.