Skip to content

Commit

Permalink
Merge pull request BonsaiDen#126 from tobie/master
Browse files Browse the repository at this point in the history
Fix incorrect description of array.length assignment.
  • Loading branch information
BonsaiDen committed Feb 10, 2012
2 parents f86154a + 51fc96d commit 22d72aa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doc/en/array/general.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ elements that are contained in the array, the *setter* can be used to
foo; // [1, 2, 3]

foo.length = 6;
foo; // [1, 2, 3]
foo.push(4);
foo; // [1, 2, 3, undefined, undefined, undefined, 4]

Assigning a smaller length does truncate the array, but increasing the length
does not have any effect on the array.
Assigning a smaller length truncates the array. Increasing it creates a sparse array.

### In Conclusion

Expand Down

0 comments on commit 22d72aa

Please sign in to comment.