console.log( parseInt("asd123")); //parseInt 值为字符串 如已字符串开头 返回NaN
console.log( parseInt("123asd")); //parseInt 值为字符串 如已数字开头 返回数字(123)
// parseFloat 与 parseInt 同理
console.log(parseInt("asd123")==NaN); //NaN和任何值都不相等 包括自己 返回 false
console.log(typeof(parseInt("asd123"))); // NaN 类型为number 
)

相关文章:

  • 2022-12-23
  • 2022-02-06
  • 2021-12-21
  • 2021-06-09
猜你喜欢
  • 2022-12-23
  • 2021-12-16
  • 2021-06-15
  • 2022-12-23
  • 2022-12-23
  • 2021-05-31
相关资源
相似解决方案