Arrays - Reading Assignment

#101
  1. arrays allow you to store multiple values in a single variable.
  2. the first element is actually 0
0 Likes

#102

Arrays object lets you store multiple values in a single variable.

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

Javascript array indexOf() method returns the first index at which a given element can be found in the array, or -1 if it is not present.

0 Likes

#103

What do arrays allow us to do?
help us to store multiple values in a single variable

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

0 Likes

#104

What do arrays allow us to do?
Arrays are able to hold a fixed number of values that can manage them as a list.

What index should you use in order to access the first element in an array?
something in the sort of calling for [0]

0 Likes

#105

Array Assignment
1 an array is a variable that allows you to store a fixed sequence of elements.
example var shops = [“Tesco”, “Lidle”, “Aldi”].
2. to access the first element shops[0], the second shop[1] and so on.

0 Likes

#106
  1. Arrays allows us to store multiple values of the same type in one binding (or in a object).

  2. The first element always starts with 0.

0 Likes

#107

Arrays allow us to make a group of things of the same type.
0

0 Likes

#108
  1. Arrays provide us with the ability to store multiple values in a single object. It means that we can store a collection of variables of the same type in one object, but we are still able to access any one or all of the values stored within that collection.

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

#109

1- Arrays allow us to store several values in a single variable
2- The first item of an array has an index value of Zero.

0 Likes

#110

What do arrays allow us to do?

The Array object lets you store a collection of elements in a single variable. This allows us to access a collection of data on a single variable.

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

0 Likes

#111

What do arrays allow us to do?
To use the same variable for different values of the same type

What index should you use in order to access the first element in an array?
varName[position]

0 Likes

#113

What do arrays allow us to do?

You can loop through arrays and do processing on each element of an array. Many think arrays can only hold simple data types, but you can also hold records, and classes (objects) of the same type. For instance I wrote a class of date/time objects called TCMXDateTime like so…

type
TCMXOlsonDateTime = class(TCMXDateTime) // inheriting base class

Then one can write an array like this outside of the unit…

property DateTimeObject[index: integer]: TCMXOlsonDateTime read GetDateTimeObject;

Then one can reference like this…

DateTime as TDateTimeObject.(insert property name here)

or

DateTime[2].JulianDate … etc…

Arrays are very flexible and useful when you want to do repetitive calculations on data of the same type. Even if they are different types, you can then specify arrays of arrays to create multiple dimensions. So one can be of type integer, then another of type Boolean, another of type Object, etc…

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

Most arrays are zero indexed. This is the reason why you often see -1 inside of loop conditions or if/then tests.

0 Likes

#114
  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.

  1. What Index Should You Use in Order to Access the First Element in an Array?

Zero will be the first index [0]

1 Like

#115

What do arrays allow us to do?
They allow us to store multiple values of the same type in a single variable.

What index should you use in order to access the first element in an array?
Arrays start at 0 (Zero)

1 Like

#116
  1. Store multiple values in a single variable.

  2. array[0];

1 Like

#117
  1. What do arrays allow us to do?

Arrays lets you store multiple values in a single variable of the same type.

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

Element in array starts with 0

1 Like

#118

What do arrays allow us to do?
arrays allows us to hold more than one value in a certain variable;
What index should you use in order to access the first element in an array? first element in the array has the index number 0

1 Like

#119

1.the array represents an ordered set of elements
2.access to the elements in the array is obtained by the index. the mass starts with an index number zero

1 Like

#120
  1. Arrays are used to collect a set of variables (called elements in this case) of the same type, inside a bigger variable.
  2. In order to access the first element in an array, you should use the index 0.
1 Like

#121
  1. store objects of the same type in one listing
  2. zero
1 Like