๐ธarray length
JS โฉ object โฉ built-in โฉ Array โฉ length
array length is automatically maintained by the array.
if you assign
a[i] = value
, where i โฅ a.length, a.length is set toi+1
.if you set
a.length = n
, where n < a.length, then any elements whose index โฅ n are deleted.
Last updated
Was this helpful?