let fruits = ["apple", "pear", "plum", "orange", "cherry"];
fruits.splice(1, 0, 'watermelon');
console.log(fruits);
fruits.splice(1, 1);
console.log(fruits)
/*
[ 'apple', 'watermelon', 'pear', 'plum', 'orange', 'cherry' ]
[ 'apple', 'pear', 'plum', 'orange', 'cherry' ]
*/