Arrays - hpgDesigns/hpg_projects GitHub Wiki
An array is a variable that can hold multiple values as a "list".
for e.g
numbers = [ 0, 1, 2, 3, 4, 5 ];
fruits = [ "Apples", "Oranges", "Pears" ];
Using this kind of syntax [item, item, item]
, we can create an array that is stored in a variable. These items can later be accessed through that variable using an integer number, starting at 0, which is placed inside "[ ]" brackets:>
first_fruit = fruits[ 0 ];
second_fruit = fruits[ 1 ];
// ...and so on.
A generic array is defined as having '1-dimension. However, one can have many dimensions in an array.