MDN explains it this way:
A null value is a JavaScript literal representing a null value or an "empty" value, that is, there is no object value. This is one of the basic JavaScript values.
Null is a literal
Further on this page you will find the following:
typeof null // object (bug in ECMAScript, should be null)
typeof undefined // undefined
null === undefined // false
null == undefined // true
Here is a code with this code showing the results (and the error was talking about this)
document.getElementById('test1').innerHTML = typeof null;
document.getElementById('test2').innerHTML = typeof undefined;
document.getElementById('test3').innerHTML = null === undefined;
document.getElementById('test4').innerHTML = null == undefined;
<div id="test1"></div>
<div id="test2"></div>
<div id="test3"></div>
<div id="test4"></div>
Run codeHide result source
share