When the second parameter of the parseInt() function (the radix) is not specified, this function may return an unexpected value. Always specify a value for the radix so that parsing is predictable.
The parseInt() function takes two parameters: a string that contains the number to parse, and the base that this number is in. The second argument is optional; if the base is not specified, parseInt() will guess which base it should use. Normally, it will use base 10, but if the number to parse starts with 0x, it will use base 16.
To avoid parsing your numbers in the wrong base, you should always specify the base to use.
As a historical note, this problem was even worse in the past, as numbers that started with a 0 would be parsed in base 8, while most people expected that those numbers would be parsed in base 10 and the leading zero dropped.