6.15 Get item from a position
We have an array called
items. It has 4 items.
items = ["ice cream", "chocolate", "movies", "beaches"]
If we want second item from the array then we need to do
Yes we need to do
 if we want second item.
If we want third item then we need to do
You can see the pattern. For the 4th item we need to do
This is because an array is based on zero index.
It means that the first item of an array starts at zero and not at one.