.length in arrays

I don’t understand the “.length” in arrays. What does it mean?

const arr = [10, 9, 8, 7, 6];

for (let i = 0; i < arr.length; i++) {
console.log(arr[i]);
}

Hi there! .length gives you the number of the entries in your array:

const arr = [10, 9, 8, 7, 6];
console.log(arr.length);

Output:

5

i < arr.length means that your loop will cover all the length of your array