The length of the String object's value measured in characters.
All String objects inherit properties and methods from the String prototype object. They will all return a value as a result of requesting the length property.
The length value of a String object is immutable.
This suggests that changing the value of a String object actually creates a new String object. This explains why continual string concatenations and modifications can sometimes cause a JavaScript execution to leak large amounts of memory as it runs.
See also: | String object, String.prototype |
Prev | Home | Next |
String.lastIndexOf() | Up | String.link() |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |