JavaScript syntax: Difference between revisions

Content deleted Content added
Line 207:
Unlike undefined, [[Null Object pattern|null]] is often set to indicate that something has been declared, but has been defined to be empty. In a Boolean context, the value of null is considered a false value in JavaScript.
 
Note: Null is a true primitive-type within the JavaScript language, of which {{mono|null}} (note case) is the single value. As such, when performing checks that enforce type checking, the null value will not equal other false types. SurprisinglyCarried over from early days of JavaScript, {{mono|<tt>null}}</tt> is considered an object by {{mono|[[<tt>typeof]]}}</tt><ref>https://2ality.com/2013/10/typeof-null.html</ref>
 
<syntaxhighlight lang="javascript">