Use the splice() method to remove "Orange" and "Apple" from fruits.
Here is the array
var fruits = ["Banana", "Orange", "Apple", "Kiwi"];
The splice() method takes 2 parameters: the index position to start at, and the number of elements to remove.
Array indexes start with 0.
var fruits = ["Banana", "Orange", "Apple", "Kiwi"]; console.log( fruits );/* w w w. j a v a2s. c om*/ fruits.splice(1, 2); console.log( fruits );