2021-04-28 16:49:39 +02:00

14 lines
380 B
Plaintext

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);
----