Arrays have a special property called length that tells you how many items are in the array. You can access it like this:
let fruits = ["apple", "banana", "cherry"];
console.log(fruits.length); // 3The .length property is incredibly useful. It lets you:
The length updates automatically as you add or remove items from the array.
You're packing a suitcase for a trip. The code asks if you want to pack three different items. At the end, print the length of the suitcase array to see how many items you packed.
Output (Console)