Arrays - Reading Assignment

Excellent answer sir! really well documented! keep it like that please! :muscle:

Carlos Z.

1 Like
  1. Arrays allow us to store multiple values, each with an index.
  2. 0
1 Like
  1. Array let’s user to store a collection of data in a single variable.
  2. Array elements count starts from 0, so to access the first element you should write YourArrayName[0].
1 Like
  • What do arrays allow us to do?
  • The Array object lets us store multiple values in a single variable.

  • What index should you use in order to access the first element in an array?
  • For example if we created a var of fruits as a new array,and gave some elements to this array, we could easily access it typing fruits[0], or fruits[2], etc depending on the order of the element we would like to reach. Elements always start from the number 0, so if we would like to reach 1st element in the array, we would have to type fruits[0].
1 Like
  1. What do arrays allow us to do?
  • To store multiple values in a single variable. So a new progression is started, a progression that otherwise it is unknown to the computer. As example in the page there is the array ā€œfruitsā€.
  1. What index should you use in order to access the first element in an array?
  • The property represents the zero-based index of the match in the string (Zero-based is the first element)
1 Like
  1. it allows us to have variable capable of storing lists.
  2. array[0]
1 Like
  1. It allows us to store multiple values of the same type in a single variable
  2. variableName[0]
2 Likes
  1. Arrays allow us to store multiple values of the same type in a single variable.
  2. An Array index begins counting from ā€˜0’, so to call the first element in an array, you would set the parameter to ā€˜0’.
1 Like
  1. What do arrays allow us to do?
    The Array object lets you store multiple values in a single variable, think of it 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?
    The index we should use to access the first element is 0.
1 Like
  1. Arrays allows us to store multiple values in a singe variable, it stores a collection of variables of the same type.
  2. indexOf()
1 Like

What do arrays allow us to do?

The arrays let us store multiple of values in one variable.

Var fruits = new Array (ā€œAppleā€, ā€œOrangeā€, ā€œBananaā€, ā€œPineappleā€);

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

0 = the first element.

1 Like
  1. It lets us store multiple values in a single variable

2.You will use ordinal numbers ie array[0] to access the first element in an array

1 Like
  1. What do arrays allow us to do? They allow us to store multiple values in a single variable as 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? A numbered index, eg:

var dogs = [ā€œsmallā€, ā€œmediumā€, ā€œlargeā€];

dogs[0] //is the first elemet

dogs[1] //is the second element

dogs[2] //is the third element
1 Like

What do arrays allow us to do?

Array’s allow us to store multiple values in a single binding.

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

Because arrays are zero based to grab the first element from an array you would use the following index array[0]

1 Like

Hi @DanD,

Nice detailed answers :ok_hand:

Just one observation…

…fixed size? What do you actually mean by that? Arrays can be manipulated, and elements added, or removed, so in that respect they aren’t fixed…but maybe you mean something else.
The rest of your definition is :star2:

2 Likes

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.

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

  • The first element of an array has index 0
1 Like
  1. Arrays allow us to store multiple values under a single variable, and we can access this values by referring to an index number where a specific value is stored.

  2. Array indexes start with 0 --> notation: arrayName[0];

1 Like
  1. Arrays helps us by collecting the same type of variables - more than one value.

  2. First index is 0

1 Like
  1. What do arrays allow us to do?
    Array helps in storing multiple values in a single variable
  2. What index should you use in order to access the first element in an array?
    Indexing starts from zero . So first element in an array has index zero.
1 Like
  1. What do arrays allow us to do?
    To store multiple values within same data type in single one variable.

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

1 Like