let a = [1,2,3] console.info(a) //-> Array(3) [ 1, 2, 3 ] let b = [4,5,6] a.push(...b) console.info(a) //-> Array(6) [ 1, 2, 3, 4, 5, 6 ]
...arr
が何だったか忘れがちなのでメモ
牌語備忘録 -pygo
let a = [1,2,3] console.info(a) //-> Array(3) [ 1, 2, 3 ] let b = [4,5,6] a.push(...b) console.info(a) //-> Array(6) [ 1, 2, 3, 4, 5, 6 ]
...arr
が何だったか忘れがちなのでメモ