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’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.

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy