Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
let ary = [1, 2, 3, 4, 5]
// array[2]から3個の要素を6で埋める
ary.splice(2, 3, 6, 6, 6)
console.log(ary) // [1, 2, 6, 6, 6]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment