1var arr = ["orange", "mango", "banana", "sugar", "tea"];
2var removed = arr.splice(2, 0, "water");
3console.log("After adding 1: " + arr );
4console.log("removed is: " + removed);
5
6removed = arr.splice(3, 1);
7console.log("After removing 1: " + arr );
8console.log("removed is: " + removed);