Skip to content

Instantly share code, notes, and snippets.

@chuck0523
Created April 15, 2017 00:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chuck0523/72ba484578e82059e984e8137959909d to your computer and use it in GitHub Desktop.
Save chuck0523/72ba484578e82059e984e8137959909d to your computer and use it in GitHub Desktop.
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