Consider the following expression
console.log( 'result: ' + parseInt("1", 0) )
It returns 1 in the console of chrome (basically returns the decimal value).
The MDN docs for parseInt says
Or NaN when the radix is smaller than 2 or bigger than 36 ...
It would be great if someone could give an explanation for this.
Thanks in advance.
MDN is summarizing the specification, and is not complete.
The actual specification says:
If radix is
undefinedor 0, it is assumed to be 10 except when the number begins with the code unit pairs0xor0X, in which case a radix of 16 is assumed.