📜  javascript中的数字和类型运算符 - 任何代码示例

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

代码示例1
var x = 2;
var y = "2";
(x == y)  // Returns true since the value of both x and y is the same

(x === y) // Returns false since the typeof x is "number" and typeof y is "string"