The length property of an Array instance is a data property whose value is always numerically greater than the name of every configurable own property whose name is an array index.
Typically, the value is number of elements of array. (provided you didn't set length, and didn't use
delete operator to delete array elements, etc.)
[see JS: Delete operator]
const ar = [3,4]; console.log ( ar.length ); // 2
Array length can be set. If you set it, the array will be lengthened (becomes sparse array) or shortened (tail elements removed).
[see JS: Sparse Array]
[see JS: Understand JS Array]
If you have a question, put $5 at patreon and message me.