A property listed doesn't work

RESOLVED INVALID

Status

Developer Documentation
General
P5
normal
RESOLVED INVALID
9 months ago
9 months ago

People

(Reporter: el8, Unassigned)

Tracking

Details

(URL)

(Reporter)

Description

9 months ago
:: Developer Documentation Request

      Request Type: Correction
     Gecko Version: unspecified
 Technical Contact: 

:: Details

Among the properties of String instances there's "N":

"N
    Used to access the character in the Nth position where N is a positive integer between 0 and one less than the value of length. These properties are read-only."

However it doesn't seem to work, for example var str = "abcd"; console.log(str.2); yields an error.
(Reporter)

Comment 1

9 months ago
Sorry, I forgot you to need to use the [property], not .property access notation if the property name starts with a number.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 9 months ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.