15.5.5 String instance properties

2010-07-11

String instances have the following properties:

[[Class]] = "String"
[[PrimitiveValue]] = the string value
length = length of the [[PrimitiveValue]]

Additionally, all characters of the [[PrimitiveValue]] are individually directly accessible through index properties, but these properties are not explicitly defined. The special [[GetOwnProperty]] method in 15.5.5.2 is used to map them dynamically.

Of course all instances inherit from the String prototype object (15.5.4).