how to use splice in javascript object code example
Example: Array#splice
let arrDeletedItems = array.splice(start[, deleteCount[, item1[, item2[, ...]]]])
let arrDeletedItems = array.splice(start[, deleteCount[, item1[, item2[, ...]]]])