Array Review
Quick refresher on arrays:
An array is created the same way as a variable
Anything can go into an array by using
[]
Each data value is paired with a key called an index.
Values in the array can be accessed with their indexes using
Array[index]
.
File Location
We will be working in the following file:
javascript-library
└── 0-PreWork
└── 1-Fundamentals
└── 1-Grammar-and-Types
└── 2-ControlFlow-and-ErrorHandling
└── 3-Loops
└── 4-Functions
└── 5-Expressions-and-Operators
└── 6-Numbers-and-Dates
└── 7-StringMethods
└── 9-Arrays
01-array-review.js <----You will be working in this file.
Practice
Create an array of cars with 3 values, then print all three to the console.
Create an array with multiple data-types and print each to the console.
Several of the string methods will also work with arrays. Though we'll go further into detail on array methods later, play around with a few of them.
Last updated