how to splice a value in javascript code example
Example 1: splice javascript
let arrDeletedItems = arr.splice(start[, deleteCount[, item1[, item2[, ...]]]])
Example 2: splice from array
let myFish = ['angel', 'clown', 'mandarin', 'sturgeon']
let removed = myFish.splice(2, 0, 'drum')
// myFish is ["angel", "clown", "drum", "mandarin", "sturgeon"]
// removed is [], no elements removed