Arrays - Reading Assignment

Arrays store multiple values in one variable.

[0]

1 Like
  • What do arrays allow us to do?

Lets us store multiple values in a single variable.

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

array[0]

1 Like
  1. store more valures under one variable
  2. 0
1 Like
  1. Arrays allow us to stores multiple values inside a single variable.
  2. Index[0].
1 Like
  • What do arrays allow us to do?

Arrays let you store multiple values in a single variable.

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

Index Zero

1 Like
  1. What do arrays allow us to do?
  • they allow us to store a collection of same type data into one variable. The different data points can be accessed using an index.
  1. What index should you use in order to access the first element in an array?
  • The first element in an array starts at position 0.
1 Like
  1. 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 of an array as a collection of variables of the same type.

  2. To access the first element in an array we should use index [0].

1 Like

an array let you store multiple values with the same data type such as strings or numbers in a single variable. The first element is at index 0 as array_name[0];

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 often more useful to think of an array as a collection of variables of the same type.

  2. What index should you use in order to access the first element in an array?
    Array[0] is the first element

1 Like

1. What do arrays allow us to do?

The Array object lets you store multiple values in a single variable.

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

The first element of a string is in index 0.

Example:

var alphabet = [ “a”, “b”, “c”, “d”, …]
alphabet[0] = a

// In order to get the first value of the string, in this case “a”, we should call alphabet[0].

1 Like
  1. Arrays allow us to store multiple values of the same type in a single variable.
  2. To access the first element in an array we would use index 0.
1 Like

1.Array is an object that allows us to store multiple values of the same type in a single variable.

  1. to access first element we use index 0
1 Like
  1. What do arrays allow us to do?
    = Store several values in one variable.

  2. What index should you use in order to access the first element in an array?
    = You always start with 0, so if you have an array like: var shopping = [‘dog food’, ‘cat food’, ‘human food’];
    You will call the second value, ‘cat food’ by writting: shopping[1] as the first value is shopping[0].

1 Like
  • What do arrays allow us to do?
    Group in only a variable a collection of variables
  • What index should you use in order to access the first element in an array?
    First element is 0, arrayName[0]
1 Like
  1. What do arrays allow us to do?
    it allow us to store a collection of data inside a variable.

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

1 Like
  1. 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. By default array index starts from zero. So the first element is in index 0
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
2. What index should you use in order to access the first element in an array?
0

1 Like
  • Arrays allow us to store multiple values in a single variable.
  • To access the first element in an array, you would use index zero.
    myArray[0]
1 Like
  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.

  2. The number in the index is 0.

1 Like
  1. Store multiple values in in 1 varible
  2. Index 0
1 Like