Home  >  Q&A  >  body text

undefined and null

undefined == null is true, the values ​​compared are all 0,

undefined === null is false, because the data types are compared, is this the case?

JiangxinJiangxin2307 days ago1114

reply all(2)I'll reply

  • 无忌哥哥

    无忌哥哥2018-06-26 10:42:11

    == means to compare values, such as a=1, b='1', then a==b is true. The three === must be congruent. Not only the array must be equal, but the data type must also be equal, then a ===b is false

    reply
    0
  • Jiangxin

    Thanks

    Jiangxin · 2018-06-26 22:19:00
  • Cancelreply