01 / 04
If you can take it out, you can put it back
fruits[1] got you the second item. Put that same writing on the left of an = and you can put a new value there.
The shape is array[number] = new value;. Exactly the same thinking as updating a variable.
const fruits = ["apple", "orange", "peach"];fruits[1] = "grape";console.log(fruits);Result
["apple", "grape", "peach"]