JavaScript Arrays Worksheet

Question 1

What is the term for items that are stored in an array?

They're known as "elements". Not to be confused with the portions of an HTML coding which are also elements.

Question 2

The position number of an item in an array is called what?

It is known as an index.

Question 3

What is the index of the first value/element in an array?

Rather than starting at 1, it starts at 0.

Question 4

True or False - The length of an array is always one greater than it's highest index.

True, as the index starts at 0. Thus, the array will always be one above.

Coding Problems

Coding Problems - See the 'script' tag below this h3 tag. You will have to write some JavaScript code in it.

You'll use the form below in one of the coding problems: