JavaScript function parseInt doesn't work as expected

VERIFIED DUPLICATE of bug 43425

Status

()

Firefox
General
--
major
VERIFIED DUPLICATE of bug 43425
8 years ago
8 years ago

People

(Reporter: Lukas Dvorak, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

8 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; cs; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; cs; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3

Function returns wrong value.

Reproducible: Always

Steps to Reproduce:
1.alert(parseInt('09'));
2.returns 0 instead of 9
3.for strings '01','02'... works as expected
Actual Results:  
script returns number 0 instead of 9

Expected Results:  
9 ;)

This bug was found also in FireFox 2.0
Status: UNCONFIRMED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 43425

Comment 2

8 years ago
Verifying. Note that even Internet Explorer has this behavior.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.