Code Editor

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']; console.log(bucketList.length); // Output: 2
Report a Bug
If you see a bug or any other issue with this page, please report it here.