Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
为什么,在 Javascript 中,
0 == ''
是真的 ?
http://jsfiddle.net/TXhCs/
那是因为 javascript 正在尝试对 as 进行类型转换,''因为''is a typeString并且0is a numbertype。'',当转换为数字时,是0
''
String
0
number