Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
let ary = [1, 2, 3, 4, 5]
// 第二引数は"個数"
ary.splice(2, 3) // [3 , 4, 5]
// 破壊的変更がなされる
console.log(ary) // [1, 2]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment