length property

It is often convenient to know how many items are inside of an array.

We can find this out by using one of an array's built in properties, called .length. We can attach this to any variable holding an array and it will return the number of items inside.

As an example:

var bucketList = ['Rappel into a cave', 'Take a falconry class'];

// Output: 2
Community Forums
Get help and ask questions in the Codecademy Forums
Report a Bug
If you see a bug or any other issue with this page, please report it here.