- ==
可以從Javascript規範中找到答案:
規範中提到, 要比較相等性之前,不能將 null 和 undefined 轉換成其他任何值,並且規定null 和 undefined 是相等的。
null 和 undefined都代表着無效的值。
undefined==null //true
- ===
類型不一致
undefined=== null //false
規範中提到, 要比較相等性之前,不能將 null 和 undefined 轉換成其他任何值,並且規定null 和 undefined 是相等的。
null 和 undefined都代表着無效的值。
undefined==null //true
undefined=== null //false
(function(d, s, id) { let js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) retur