Array properties
Array length
The length is an integer in the range zero through 2^32−1. It tracks the index boundary, not the number of existing elements. Reducing writable length deletes higher indexed own properties subject to configurability.
Formal Syntax & Structure
javascript syntaxjavascript
items.lengthReturn Value
Number
Current index boundary; writable on ordinary arrays.
Working Example
Example Snippetjavascript
const a=[7]; a.length=4;console.log(a.length,3 in a);