Array elements can be changed using the index number.
Let's change the first element of our array to "Kiwi".
Since the first element of the array can be accessed using the value , we need to type the following line underneath our array variable.
fruits = "Kiwi";
We can also delete elements in an array using index numbers.
Let's delete pear from our list of elements. Since pear would have the index number 2, we can type the following.