Hi, thanks for revising!
An array lets you store multiple values in a single variable.
It starts with zero.
1, Arrays allow us to store multiple value in a single variable.
2, The counting in an array starts from 0, meaning you have to use the [0] element to access the first array
- Allow to store multiple values in a single variable.
- by default array starts from 0,so first element is the index 0
- Arrays allow us to store multiple variables of the same type.
- when calling the first variable in an array, [0] is the index number needed.
- store, process and iterate over a collection of values
- zero
1/ arrays allow us to store more than one values/objects in a variable
2/ first element is in index zero
- allow us to store information in a simple, stacked manner
- 0 (zero)
- An array enables you to store multiples values within a single a variable.
- To access the first element of an array do console.log(arr[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. 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.
-
You use ordinal numbers to access and to set values inside an array; you also start from 0 instead of 1.
-
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.
-
indexOf(0)
- What do arrays allow us to do? Allow us to store sequences of values.
- What index should you use in order to access the first element in an array? The first index should be zero.
- An array is a data type for storing specific sequences of values.
- The index for the first element of an array is 0 (zero).
-
Arrays allow us to store multiple values (usually of the same type) in a single variable.
-
Index 0.
-
store more than one value (can be string or integer) in a single variable
-
arrayname[0]
-
The Array object lets you store multiple values in a single variable.
-
By default array index starts from zero. So first element is in index 0.
- Arrays allows us to store multiple values in a function
- The first element that we usually use to access an arrays is starting from 0.
This assignment, much easier
What do arrays allow us to do?
store multiple values in a single variable
What index should you use in order to access the first element in an array?
0
Q1: What do arrays allow us to do?
A1: An Array (object) allows multiple values to be stored in a single variable - e.g.
var fruits = new Array( "apple", "orange", "mango" );
Q2: What index should you use in order to access the first element in an array?
A2: 0 (zero)
-
What do arrays allow us to do?
We can store multiple values in one variable. -
What index should you use in order to access the first element in an array?
[0]