get it on google playCreated with Sketch.
JavaScript> Array length

Array length

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);
TRY IT ON THE APP