join
map
pop
各要素を変換して新しい配列を返します。
arr.map(callbackFn)
下記の値を入力するとサンプルに即時反映されます。
const
numbers
doubled
console
const numbers = [1, 2, 3, 4, 5]; const doubled = numbers.map((n) => n * 2); console.log(doubled); // [2, 4, 6, 8, 10]