/"removes any number of consecutive elements from anywhere in an array."/
let array = ['today', 'was', 'not', 'so', 'great'];
array.splice(2, 2);
// remove 2 elements beginning with the 3rd element
// array now equals ['today', 'was', 'great']
//Example 1:
//Remove 1 element at index 3
let myFish = ['angel', 'clown', 'drum', 'mandarin', 'sturgeon']
let removed = myFish.splice(3, 1)
//Result
// myFish is ["angel", "clown", "drum", "sturgeon"]
// removed is ["mandarin"]
//Example 2:
//Remove 1 element at index 2, and insert "trumpet"
let myFish = ['angel', 'clown', 'drum', 'sturgeon']
let removed = myFish.splice(2, 1, 'trumpet')
//Result
// myFish is ["angel", "clown", "trumpet", "sturgeon"]
// removed is ["drum"]