A list of values
A variable holds one value. An array holds a whole list of values in a single variable. You write an array with square brackets [ ], separating the items with commas:
let scores = [10, 20, 30];Reading an item
Each item has a position called its index. Counting starts at 0, not 1 — so the first item is scores[0], the second is scores[1], and so on. Put the index in square brackets after the array's name:
How many?
scores.length tells you how many items the array has — here, 3. The last item is always at index length - 1.