Why does “undefined equals false” return false?

后端 未结 7 1142
借酒劲吻你
借酒劲吻你 2020-11-30 06:28

When I compare undefined and null against Boolean false, the statement returns false:

undefined == false;
null == false;

It return false. W

7条回答
  •  借酒劲吻你
    2020-11-30 06:43

    This is so because it is so. :)

    Read the ECMA standards here: https://www.ecma-international.org/ecma-262/5.1/#sec-11.9.3

提交回复
热议问题