Nice work! In this lesson, we learned these concepts regarding arrays:
myArray = 'new string';
lengthproperty, which allows you to see how many items are in an array.
.pop(), which add and remove items from an array, respectively.
.shift(), you can find documentation at the Mozilla Developer Network website.
const. Even when declared with
const, arrays are still mutable. However, a variable declared with
constcannot be reassigned.
Learning how to work with and manipulate arrays will help you work with chunks of data!
Looking for more ways to practice? Consider trying these:
.lengthproperty to find the last element of an array.
.push()on an array.