splice
memo
code:js
const aa = []
aa.splice(0, ...array)
aa
const bb = []
bb.splice(0, 'a', 'b', 'c')
bb
const cc = []
cc.splice(0, 0, ...array)
cc
# push が簡単
const xx = []
xx.push(...array)
code:js
// 第3引数があるときは第2引数を省略できない
splice(start)
splice(start, deleteCount)
splice(start, deleteCount, item1)
splice(start, deleteCount, item1, item2, itemN)