Compare Revisions

Array.length

Revision 445591:

Revision 445591 by jswisher on

Revision 455779:

Revision 455779 by chewxy on

Title:
Array.length
Array.length
Slug:
Web/JavaScript/Reference/Global_Objects/Array/length
Web/JavaScript/Reference/Global_Objects/Array/length
Tags:
"Array"
"Array"
Content:

Revision 445591
Revision 455779
t53      You can set the <code>length</code> property to truncate ant53      You can set the <code>length</code> property to truncate an
> array at any time. When you extend an array by changing its <cod> array at any time. When you extend an array by changing its <cod
>e>length</code> property, the number of actual elements does not >e>length</code> property, the number of actual elements does not 
>increase; for example, if you set <code>length</code> to 3 when i>increase; for example, if you set <code>length</code> to 3 when i
>t is currently 2, the array still contains only 2 elements.&nbsp;>t is currently 2, the array still contains only 2 elements.&nbsp;
> Also see <a href="/en-US/docs//Web/JavaScript/Reference/Global_O> Also see <a href="/en-US/docs/Web/JavaScript/Reference/Global_Ob
>bjects/Array#Relationship_between_length_and_numerical_properties>jects/Array#Relationship_between_length_and_numerical_properties"
>" title="/en-US/docs//Web/JavaScript/Reference/Global_Objects/Arr> title="Relationship between length and numerical properties">Rel
>ay#Relationship_between_length_and_numerical_properties">Relation>ationship between length and numerical properties</a>. The <code>
>ship between length and numerical properties</a>. The <code>lengt>length</code> property says nothing about the number of values in
>h</code> property says nothing about the number of values in the > the array.
>array. 

Back to History