Arrays are collection of elements (elements of same type).
fruits
holds four string values. Each fruit is stored at a specific index:
fruits[0]
is "apple"
fruits[1]
is "banana"
fruits[2]
is "mango"
fruits[3]
is "orange"
fruits
array, if you want the third fruit, you simply use fruits[2]
. This makes arrays ideal for situations where you need to organize and retrieve items quickly using their position in a list. Arrays are efficient, easy to use, and form the backbone of many other data structures.
https://en.wikipedia.org/wiki/Array
_(data_structure)