Arrays store multiple values in one variable.
[0]
Arrays store multiple values in one variable.
[0]
Lets us store multiple values in a single variable.
array[0]
Arrays let you store multiple values in a single variable.
Index Zero
Array object lets us store multiple values in a single variable. An array is used to store a collection of data, but it is often more useful to think of an array as a collection of variables of the same type.
To access the first element in an array we should use index [0].
an array let you store multiple values with the same data type such as strings or numbers in a single variable. The first element is at index 0 as array_name[0];
What do arrays allow us to do?
The Array object lets you store multiple values in a single variable. It stores a fixed-size sequential collection of elements of the same type. An array is used to store a collection of data, but it is often more useful to think of an array as a collection of variables of the same type.
What index should you use in order to access the first element in an array?
Array[0] is the first element
1. What do arrays allow us to do?
The Array object lets you store multiple values in a single variable.
2. What index should you use in order to access the first element in an array?
The first element of a string is in index 0.
Example:
var alphabet = [ “a”, “b”, “c”, “d”, …]
alphabet[0] = a
// In order to get the first value of the string, in this case “a”, we should call alphabet[0].
1.Array is an object that allows us to store multiple values of the same type in a single variable.
What do arrays allow us to do?
= Store several values in one variable.
What index should you use in order to access the first element in an array?
= You always start with 0, so if you have an array like: var shopping = [‘dog food’, ‘cat food’, ‘human food’];
You will call the second value, ‘cat food’ by writting: shopping[1] as the first value is shopping[0].
What do arrays allow us to do?
it allow us to store a collection of data inside a variable.
What index should you use in order to access the first element in an array?
Index 0
1. What do arrays allow us to do?
The array object lets you store multiple values in a single variable. It stores a fixed-size sequential collection of elements of the same type
2. What index should you use in order to access the first element in an array?
0
The Array object lets you store multiple values in a single variable. It stores a fixed-size sequential collection of elements of the same type.
The number in the index is 0.