Non-string value for the first argument of the parseInt() function will not be converted to one (1).

RESOLVED FIXED

Status

Developer Documentation
JavaScript
P5
normal
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: fumio, Unassigned)

Tracking

Details

(URL)

(Reporter)

Description

2 years ago
:: Developer Documentation Request

      Request Type: Correction
     Gecko Version: unspecified
 Technical Contact: 

:: Details

According to the Parameters section of the parseInt(), "If string is not a string, then it is converted to one".  But this explanation is incorrect.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/parseInt#Parameters
the meaning of "one" means "string" here not 1 (the number). I changed it to

"If string is not a string, then it is converted to a string (using the ToString abstract operation)."
Status: UNCONFIRMED → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.