Always pass the radix to parseInt
parseInt method takes two parameters:
The second parameter specifies the current numeral system. In the case it's not specified, then it will be set automatically based on the value.
If the value starts with
0X, then the radix is 16 (hexadecimal). In other cases, the radix is 10 (decimal).
0 then the radix is set as 8 (octal).