📜  typescript == vs === - TypeScript 代码示例

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

代码示例1
/*
The == operator will compare for equality after doing any necessary type conversions. 
The === operator will not do the conversion, so if two values are not the same type === will simply return false. 
Both are equally quick.
*/

0 == '' // true
0 === '' // false