DEV Community

Discussion on: High Performance JavaScript

Collapse
 
pentacular profile image
pentacular

parseInt detects a leading zero on the string, it will parse the number in octal base

This is generally the best reason not to use parseInt.

It requires well formed input or can produce astonishing results. :)