Arrays - Reading Assignment

Greetings @docbdublin,
A little clarification on your below statement.

An array in javascript can have different data types too. for example –

//This array contains a string, number and an object.
var myArray = [ "malik", 4 , { name: "sampleObject", type:"myObject"} ]

Hope this clears it out. Happy Learning! :slight_smile:

2 Likes

Hi!!1 If anyone reads these answers please let me know, so I dont feel so lonely learning

  1. What do arrays allow us to do?
    arrays allows us to do many things … arrays are some kind of list of several values or variables, or could even be arrays of arrays (matrix) in several dimensions… in math or algebra they are used to simplify calculations, but can also be used to store values in an order fashion… I would say they are the most simple form of a database
  2. What index should you use in order to access the first element in an array?
    number zerooooo
3 Likes
  1. Arrays allow us to store many values in one variable.

  2. 0

1 Like

1. What do arrays allow us to do?
Arrays can hold more than one value at a time.
2. What index should you use in order to access the first element in an array?
Index0

1 Like
  1. Arrays allow us to store multiple values in a single variable of the same type
  2. [0] is the first element
1 Like
  1. What do arrays allow us to do?

Allows us to store multiple values in a single variable

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

Index 0

1 Like
  1. What do arrays allow us to do?
    They allow us to store multiple values in a single variable. It’s a fixed-sized 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
  1. Arrays allow us to store multiple values with 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.
  1. What index should you use in order to access the first element in an array?
  • arrayName[Index Zero] e.g alert(myArray[0]);
1 Like
  1. The Array object lets you store multiple values in a single variable.
  2. 0
1 Like

1.) Arrays allow you to store multiple values within a single variable.
2.) Zero is the first index.

1 Like

Q). What do arrays allow us to do?
A). Arrays in JavaScript enables multiple values to be stored in a single variable. It stores the same kind of element collection sequential fixed-size. Arrays in JavaScript are used to store an information set, but it is often more helpful for storing a set of variables of the same type.

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

A).JavaScript arrays are zero-indexed. The first element of an array is at index 0, and the last element is at the index value equal to the value of the array’s length property minus 1.
// ‘ACCESSING ARRAY ELEMENTS.’
let arr = [‘this is the first element’, ‘this is the second element’, ‘this is the last element’]
console.log(arr[0]) // logs ‘this is the first element’
console.log(arr[1]) // logs ‘this is the second element’
console.log(arr[arr.length - 1]) // logs ‘this is the last element’

1 Like
  1. What do arrays allow us to do?
    Ans: An array allows us to save/store “multiple values in a single variable.”

  2. What index should you use in order to access the first element in an array?
    Ans: index = 0 corresponds to the first element in an array.

1 Like
  1. The Array lets you store multiple values in a single variable.
  2. The first element of an array has index 0.
1 Like
  1. What do arrays allow us to do?
    Arrays allow the programmer to store a list of values or objects which can be called on at a later date.

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

1 Like
  1. Arrais allows you to store multiple values in a single variable

  2. the first element of the index is automatically set to 0. so the index you need to use in order to access the first element in the array is 0

1 Like
  1. Arrays allow you to store multiple values in a single variable.

  2. 0

1 Like
  1. What do arrays allow us to do?
    Put multiple objects together in a list of objects

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

1 Like

Homework on Arrays - Questions September 13th, 2020

  1. What do arrays allow us to do?
    Arrays will allow us to 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 index in a array variable is 0-zero.

-Hector A. Martinez

1 Like
  1. The array object lets you store multiple values in a single variable.
  2. You should use index zero in order to access the first element in an array.
1 Like