-
What do arrays allow us to do?
Arrays allow us to store multiple values in a single variable. -
What index should you use in order to access the first element in an array?
0
- What do arrays allow us to do? Arrays allow us to assign multiple integers or strings at one time.
- What index should you use in order to access the first element in an array? array[0]
1.Arrays allow us to group vaules together.
2. Zero is the first then One,Two, Ect…
- 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?
ordinal numbers starting with 0
- What do arrays allow us to do?
An Array allows the programmer to store multiple values in a single variable to create collections of data. - What index should you use in order to access the first element in an array? [0]
Take a look at this blog post: https://www.tutorialspoint.com/javascript/javascript_arrays_object.htm. Read and try to understand what arrays are and why we need them.
Try to answer the following questions while reading:
-
What do arrays allow us to do? | Arrays allow us to assign multiple values to a single variable.
-
What index should you use in order to access the first element in an array?
-
What do arrays allow us to do?
A. 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?
A. 0
-
What do arrays allow us to do?
Store several variables of similar types. -
What index should you use in order to access the first element in an array?
Index to zero.
An array with 5 elements will be array[0], array[1], array[2], array[3], array[4], array[5]
- Allows to store ina single variable multiple values.
2)First element index 0.
What do arrays allow us to do?
Store multiple values inside a single variable.
(Example: var princessBubblegum = ["pink", "princess", "long hair"];
What index should you use in order to access the fist element in an array?
0
(An array with 3 elements will go pink[0] princess[1] long hair[2])
- They let us 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.
2.[0]
-
Arrays are used to store values or objects in a variable
-
First element has index 0
Q: What do arrays allow us to do?
A: Allows us to store multiple values in a variable.
Q: What index should you use in order to access the first element in an array?
A: First element is 0.
- Arrays allow you to store a set of values of the same type in a single variable
- The index of the first element is 0.
-
The 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 or an array as a collection of variables of the same type.
-
We will use ordinal numbers to access and to set values inside an array as follow.
fruits[0] is the first element
-
Arrays allow us to put multiple values in a single variable.
-
In programming every index or counting starts from 0 .
- What do arrays allow us to do?
The Array object lets you store multiple values in a single variable.
- What index should you use in order to access the first element in an array?
The index of the first element in an array is 0.
1.) We can store multiple values in a single variable.
2.) index[0]
1: Arrays allow you to use multiple variables within the same type. Objects with the same data type.
2: You would use index 0 because all starting Arrays have the index 0 in most programming languages.
-
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.
-
We should use 0 index as arrays start counting the first element from 0.