The parseInt
function has two versions, one that takes a base value as a second argument, and one that does not. Unfortunately using
the single-arg version can result in unexpected results on older browsers.
Noncompliant code example
parseInt("010"); // Noncompliant; pre-2013 browsers may return 8
Compliant solution
parseInt("010", 10);