The splice() method adds and/or removes array elements.
The splice() method overwrites the original array.
array.splice(index, howmany to remove, item1, ....., itemX)
const fruits = ["Banana", "Orange", "Apple", "Mango"];
fruits.splice(2, 1, "Lemon", "Kiwi");
//Banana,Orange,Lemon,Kiwi,Mango