Excellent answer sir! really well documented! keep it like that please!
Carlos Z.
Excellent answer sir! really well documented! keep it like that please!
Carlos Z.
What do arrays allow us to do?
The arrays let us store multiple of values in one variable.
Var fruits = new Array (āAppleā, āOrangeā, āBananaā, āPineappleā);
What index should you use in order to access the first element in an array?
0 = the first element.
2.You will use ordinal numbers ie array[0] to access the first element in an array
var dogs = [āsmallā, āmediumā, ālargeā];
dogs[0] //is the first elemet
dogs[1] //is the second element
dogs[2] //is the third element
Arrayās allow us to store multiple values in a single binding.
Because arrays are zero based to grab the first element from an array you would use the following index array[0]
Hi @DanD,
Nice detailed answers
Just one observationā¦
ā¦fixed size? What do you actually mean by that? Arrays can be manipulated, and elements added, or removed, so in that respect they arenāt fixedā¦but maybe you mean something else.
The rest of your definition is
What do arrays allow us to do?
What index should you use in order to access the first element in an array?
Arrays allow us to store multiple values under a single variable, and we can access this values by referring to an index number where a specific value is stored.
Array indexes start with 0 --> notation: arrayName[0];
Arrays helps us by collecting the same type of variables - more than one value.
First index is 0
What do arrays allow us to do?
To store multiple values within same data type in single one variable.
What index should you use in order to access the first element in an array?
By default, 0