The length property sets or returns the number of elements in an array.
Property | |||||
---|---|---|---|---|---|
length | Yes | Yes | Yes | Yes | Yes |
Return the length of an array:
Set the length of an array:
Return Value: | A Number, representing the number of elements in the array object |
---|---|
JavaScript Version: | 1.1 |