Javascript Arrays Flashcards

1
Q

What is the principal use of arrays?

A

You can store ordered lists of data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Describe the syntax (structure) of array-literals in JavaScript.

A

const array_name = [item1, item2, …];

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What number represents the first index of an array?

A

0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How can you access the last element of an array?

A

length - 1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly