Arrays - Reading Assignment

1. What do arrays allow us to do?
Arrays allow us to access each of its elements by using the array name and the index of each element, which is written in square brackets. Arrays are very useful in combination with for loops, if you want to execute the same code on each element of the array. You can access the number of elements in the array by using the length attribute, for example myArray.length.
Arrays can also be passed as an argument for functions. For example if you want to calculate the average of all values in an array of numbers. This way you can pass an arbitrary number of arguments to a function using the ... statement before your array name in your function call. If you try to find the highest value in an array of numbers you simply use Math.max(...numbers); to access this value!

2. What index should you use in order to access the first element in an array?
The first index of an array is always zero. You can access this element by using the name of the array followed by a 0 in square brackets, for example myArray[0]. Because the counting starts at 0 and we have myArray.length elements in the array, the highest index of this array is myArray.length - 1.

1 Like
  1. Arrays allow us to store multiple values in a single variable.
  2. index[0].
1 Like
  1. What do arrays allow us to do?
    Arrays a kind of object specialized for storing sequences of things. So you can store multiple data types and their values as a single variable.

  2. What index should you use in order to access the first element in an array?
    indexOf(0)

1 Like
  1. Arrays allow us to store mulitple values in a single variable.

  2. IndexOf(0)

1 Like
  1. An array is an object lets you store multiple values in a single variable.

  2. An array index starts at 0. So, first element is in index 0.

1 Like

Allows us to store multiple values in a single variable.

reset() gives you the first value of the array if you have an element inside the array.

1 Like
  • What do arrays allow us to do?

Arrays allow us to compile a group of values that are related in some way that only the programmer can decide.

  • What index should you use in order to access the first element in an array?

In order to access the first element in an array, one must use the 0 index.

1 Like
  1. An array object allows us to store multiple values in a variable. A collection of variables of the same type.
  2. 0
1 Like

1. What do arrays allow us to do?

The arrays allow us to store or collect the same type of variables (or elements) in one variable.

2. What index should you use to access the first element in an array?

The first element or variable is set to value of 0 .

1 Like

Arrays allow us to store multiple values in one variable.

Index 0 is the first element in an array.

1 Like

What do arrays allow us to do?
They allow us to hold more than one value in a variable

What index should you use in order to access the first element in an array?
0
Because the index reads how many items you want it to skip.

1 Like
  1. Allows us to store a list of values of the same type, string or integers. So it facilitates to deal with values.

  2. ArrayName[0], the first element is index 0.

1 Like

1. What do arrays allow us to do?
An array functions like a database, where you can store many expressions in one variable. This can be values, strings, booleans etc.

2. What index should you use in order to access the first element in an array?
An array starts counting from zero. So to access the the first element one need the use the index zero. index one for the second element. index two for the third element and so on.

1 Like

Glenn_CostaRica

1. What do arrays allow us to do?
Arrays allow us to store, in an ordered and structured way, one finite set of variables. All these variables must be of the same type, but can have different values.

2. What index should you use in order to access the first element in an array?
Index 0, since all arrays start numbering its positions with number zero. The first position is zero, the second is one, the third is two, and so on. The code to invoque the first element of the array would look like this: nameOfMyArray[0].

1 Like

1. What do arrays allow us to do?
Arrays allow us to store multiple collections of data under a single variable.

2. What index should you use in order to access the first element in an array?
The first element of an array always equals to index 0 followed by 1, 2 and so fort.

1 Like

What do arrays allow us to do?
store multiple values of the same type in a single variable

What index should you use in order to access the first element in an array?
Index 0

1 Like
  1. Arrays allow us to store multiple values in one variable.
  2. One should use an index of 0 in order to access the first element of the array.
1 Like
  1. Arrays allow us to store multiple values to a variable
  2. Index 0
1 Like
  1. Arrays allow us to store multiple values in a single variable.

  2. The index you should use in order to access the first element in an array is zero (0).

1 Like
  1. Arrays allow us to store multiple values in a single variable.

  2. Index 0

1 Like