为什么是
console.log('' == false); //true
但是
console.log('' === false); //false
基于 this最后一行应该返回 true,对吗?
最佳答案
因为 ===
检查类型并且字符串是字符串而 false 是 bool 值。
关于javascript - 评估空字符串的值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11966338/