Arrays - Reading Assignment

What do arrays allow us to do?
It allows you to store multiple values in a single variable. These values are variables of the same type.
What index should you use in order to access the first element in an array?
The zero index (0)

1 Like

What do arrays allow us to do?
It allows us to provide a data type specifically for storing sequences of values.

***What index should you use in order to access the first element in an array?
The first index of an array is zero [0]

1 Like
  1. Allows us to assign a collection of date to a variable
  2. The index count starts from 0, so 0.
1 Like

What do arrays allow us to do?

Store multiple values in a single variable.

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

indexOf()

1 Like

1 Arrays allow us to put multiple variables into in a single variable.

2 If our array variable is ‘fruits’, then we access it with fruits[0], because computers start counting from 0 (0,1,2,3…). That means fruits[1] will bring us the second value in the array.

1 Like

I don’t think the assignment asked us to post here, just to think about the answers.

‘>.>’ anyway…

  1. Arrays allow us to store multiple values in one variable.
  2. we use 0 a the first index.
1 Like
  1. What do arrays allow us to do?
    An array is a collection of different values of the same variable type.
    That allows us to store multiple values of the same type in one single variable.

  2. What index should you use in order to access the first element in an array?
    If you create an array with, lets say, 10 elements, by default the first element has index 0, since the computer starts counting from 0.
    So to access the first element of that array you would use index 0 and to access the last element (10th element) you would use index 9.

1 Like

1Arrays allow us to store multiples variables in a single structure
2. Arrays start at 0 so zero should be used to access the first element

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

To store multiple values in single variable. Which is easier for writing code.

It’s usually thought of array as a collection of variables of the same type.

  1. What index should you use in order to access the first element in an array?
var fruits = [ "apple", "orange", "mango" ];

fruits[0] is the first element // apple

fruits[1] is the second element // orange

fruits[2] is the third element // mango

:tada: :tada: :tada:
:tada: :tada:
:tada:

1 Like

1. What do arrays allow us to do?
Arrays help us store multiple values in single data-structure. String is also a type of array with each character as separate element. They are specialized kind of object specialized for storing sequence of things.

2. What index should you use in order to access the first element in an array?
Like most programming languages, arrays in Javascript start with 0 e.g.

let stringName=“meesam”;
console.log(stringName[0]); //‘m’

1 Like
  1. What do arrays allow us to do? Store sequences of values
  2. What index should you use in order to access the first element in an array? zero
2 Likes
  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? 0
1 Like
  1. It gives you the ability to store multiple values in a single variable

  2. position 0

1 Like
  1. What do arrays allow us to do?
  • Arrays allows to store multiple values in a single variable
  1. What index should you use in order to access the first element in an array?
  • 0
1 Like
  1. allows us to have multiple values of the same type under one variable.
  2. 0
1 Like
  1. Arrays allow us to store multiple values in a single variable
  2. name[0]
1 Like
  1. Arrays allow us to add multiple values into a single variable
  2. 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?

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. 0
1 Like
  1. Arrays allow you to store multiple values in a single variable. It is a collection of variables of the same type.
  2. [name of string] 0 is the first element
1 Like