📜  使用 === 而不是 == - 任何代码示例

📅  最后修改于: 2022-03-11 14:59:17.697000             🧑  作者: Mango

代码示例1
[10] === 10    // is false
[10]  == 10    // is true
'10' == 10     // is true
'10' === 10    // is false
 []   == 0     // is true
 [] ===  0     // is false
 '' == false   // is true but true == "a" is false
 '' ===   false // is false