Skip to content

Instantly share code, notes, and snippets.

@chuck0523
Last active 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/1ab3b38c61b8413eae2b4981cfc614c7 to your computer and use it in GitHub Desktop.
Save chuck0523/1ab3b38c61b8413eae2b4981cfc614c7 to your computer and use it in GitHub Desktop.
let ary = [1, 2, 3, 4, 5]
// 第二引数は"未満"の終了位置
ary.slice(2, 3) // [3]
// 元の配列に変更はなし
console.log(ary) // [1, 2, 3, 4, 5]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment