Hint
map always returns a new array of the same length. It transforms without mutating.
const nums = [1, 2, 3, 4, 5];
console.log(nums.map(n => n * n).join(','));1,4,9,16,25
Explanation: map creates a new array by applying the callback to each element.
Key Insight: map always returns a new array of the same length. It transforms without mutating.