为什么`parseInt`表现不同,只返回23表示大于23的数字?

时间:2017-07-29 12:18:42

标签: javascript parseint

为什么parseInt()为大于23的值/数字返回23?看到这种奇怪的行为,不知道为什么会发生这种情况?有人可以帮我解释一下原因吗?



console.log(parseInt(null, 10));
console.log(parseInt(null, 23));
console.log(parseInt(null, 24));
console.log(parseInt(null, 30));




0 个答案:

没有答案