JS 字符串转换为number

// '+ "42"' --》 + 加上数字字符串可转换成数值
console.log(typeof (+ "42"));
// 输出为 number

  

posted @ 2018-03-09 18:02  小凤凰  Views(1758)  Comments(0Edit  收藏  举报