js字符串解析成数字

parseInt()spa 先把参数转换成字符串:左边有连续的数字则返回数值,若没有则返回NaN。code console.log('parseInt(null)',parseInt(null)); // NaN console.log('parseInt("")',parseInt("")); // NaN console.log('parseInt(true)',parseInt(true))
相关文章
相关标签/搜索