Javascript Arrays Flashcards
1
Q
What is the principal use of arrays?
A
You can store ordered lists of data.
2
Q
Describe the syntax (structure) of array-literals in JavaScript.
A
const array_name = [item1, item2, …];
3
Q
What number represents the first index of an array?
A
0
4
Q
How can you access the last element of an array?
A
length - 1