We use the word length
after the array name and a period .
to get the number of elements in an array.
const tasks = ["dishes", "windows", "vacuum"];
console.log(tasks.length);
No matter how many elements there are in an array, length
will count them for us.
const tasks = ["dishes", "windows", "vacuum", "dusting", "laundry"];
console.log(tasks.length);