js "" == 0 结果为 true

console.log("" * 1); // 结果为0 两个不一样类型值比较,其中一个是数字,另外一个是字符串,会先将字符串转换为数字,而后比较数字web
相关文章
相关标签/搜索