Arrays - Reading Assignment

an Array object let’s us store multiple values in a single variable. It stores 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 o think of an array as a collection of variables of the same type.

[ ] is what you use to call or access the first element in an array.

I think it is a typo error, you mean [0] right.

1 Like
  1. Array allows to store mutiple vlaue in a sigle variable.

  2. x[0]

1 Like

That is a mistake that I made.

So then the correct answer would be what you wrote [ 0 ]

Thanks for the feedback @Maki

1 Like
  1. What do arrays allow us to do?
    Arrays allow you to store multiple values in a single variable.
  2. What index should you use in order to access the first element in an array?
    Arrays start at zero
1 Like
  1. Arrays allow us to store muiltiple values in a single variable.

  2. You use index 2.

To access the first element you use index 0.

  1. the array object lets u store multiple values in a single variable.
  2. [0] is the first index.
1 Like
  1. Arrays give us the ability to store a collection of data, but for simplicity’s sake arrays can be seen as a collection of multiple values stored as a single variable.

  2. The indexing of arrays always starts counting from 0, so to access your first element you’d use 0 as your index.

1 Like

An array allows us to store multiple items of the same type together. This makes it easier to calculate the position of each element by simply adding an offset to a base value, i.e., the memory location of the first element of the array denoted by the name of the array.

To access the first element in an array we use index 0, as the index of an array starts with 0 and then it goes on.

1 Like

1 allow a variable to hold multiple values
2. 0

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

Arrays let you store multiple values in a single variable. It stores a fixed size sequential collection of elements of the same type.

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

Fruits (0) is the first element, 0 is the first element in the list.

1 Like