Closed Bug 29131 Opened 26 years ago Closed 26 years ago

JS Weird handling of numbers

Categories

(Core :: JavaScript Engine, defect, P3)

x86
FreeBSD
defect

Tracking

()

VERIFIED INVALID

People

(Reporter: pete, Assigned: rogerl)

Details

simple test case: var n= 0555; alert(n); Result I get 365; Am i missing something here or is this totally wacked? pete
You're missing something. The leading 0 tells JS it's an octal number. 555(base8) is 365(base10). Strange but true.
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → INVALID
Verified invalid.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.