// splice(start)
// splice(start, deleteCount)
// splice(start, deleteCount, item1, ...)

const datas = ["aa", "bb", "cc"];
console.log(datas.splice(1))
console.log(datas)

console.log(datas.splice(1, 1))
console.log(datas)

console.log(datas.splice(1, 0, "xx", "yy"))
console.log(datas)

console.log(datas.splice(1, 1, "xx"))
console.log(datas)

/*
# node splice.js 
[ 'bb', 'cc' ]
[ 'aa' ]
[]
[ 'aa' ]
[]
[ 'aa', 'xx', 'yy' ]
[ 'xx' ]
[ 'aa', 'xx', 'yy' ]
*/
