Arrays - Reading Assignment

  1. The Array object lets us store multiple values in a single variable. It is a collection of variables (data) of the same type.
    2.You can access the first element by using the index 0.
  1. Hold more the one value in a variable.

  2. 0

  1. arrays are used to store more than one value in a variable
  2. the first starts at zero
  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 the zero-based index.
  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. 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.

  2. [0]

1 Like

i. What do arrays allow us to do? An array lets us store multiple values in a single variable, but it better to think of an array as a collection of variables of the same type.

ii. What index should you use in order to access the first element in an array? Zero.

1 Like
  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. An array is used to store a collection of data, but it is mroe usedful to think of an array as a collection a variables of the same type.

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

Zero

1 Like
  1. Store multiple values in a single variable.
  2. 0
1 Like
  1. What do arrays allow us to do?
    it allows us to store multiple values under the same name in an indexed way so that it is easy to access any element

  2. What index should you use in order to access the first element in an array?
    the first element of an array has index zero β€œ0”

1 Like
  1. What do arrays allow us to do?
    An array is a collection of variables of the same type.

  2. What index should you use in order to access the first element in an array?
    Arrays start counting at 0, so the first element is 0.

1 Like
  1. What do arrays allow us to do? Store multiple indexed values (which can be mixed ie. numbers/text) in a single object.

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

1 Like
  1. Arrays allow us to store multiple values of the same type in a single variable.

  2. Index 0 (and not 1 as we could think first).

1 Like

For Question 1 it depends on the programming language you are using but with javascript you can store multiples types in an array, in solidity you can’t so both answers are right i guess :slight_smile:

  1. Arrays allow us to store into a variable a set of values.

  2. To access the first element we have to point the array element to 0 or Array.[0]. Elements in Arrays begin from 0 instead of 1 for the first value.

1 Like
  1. It allows us to store more than one value in a variable.

  2. The first Index will always be 0.

1 Like
  1. An array allows us to store multiple values in a single variable. Collection of elements of the same type.

  2. First element of an array has index 0

1 Like
  1. What do arrays allow us to do?

The arrays allow us to store multiple values in a single variable where each value can be accessed by invoking specific index number. That is why we can think of an array as a collection of variables, but it is important that all values stored in array must be of the same type.

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

In order to access the first element in array you should use index 0.

exampleArray[0]

1 Like

What do arrays allow us to do?
It 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 first element is index number 0

1 Like
  • What do arrays allow us to do?
    Arrays allow us to add a list of items to a variable and access them calling the number that is corresponding to their position on the list.

  • What index should you use in order to access the first element in an array?
    The first element of the array has number β€œ0” because in javascript the numbers start from β€œ0” not from β€œ1”.

1 Like
  1. Arrays allow you to stor mutipule values inside a single variable.

  2. You should use a zero-based index.

1 Like