Null object: Difference between revisions

Line 452:
 
=={{header|JavaScript}}==
In Javascript <tt>null</tt> is the value that isn't anything. <tt>null</tt> is not an object, but because of a bug <tt>typeof null</tt> will return "object".
<lang javascript>if (object === null) {
alert("object is null");
// The object is nothing
}
 
typeof null === '"object'"; // This stands since the beginning of JavaScript</lang>
 
=={{header|K}}==
Anonymous user