Arrays, Part 0

Learn a more complex data type: the array. Arrays are collections of other variables. They're used to store items and work with them collectively. All items in an array are ordered and indexed, with the first index being 0.

We'll cover the following...

We’ve seen how to create booleans, numbers, and strings. We’re now going to create a new type of variable called an array.

Creating an Array

Arrays can be thought of as containers. They contain multiple other variables inside them in an ordered way. They’re created with the [] characters.

Press + to interact
let array = [];
console.log(array); // -> []

Adding Items

...