Content deleted Content added
m →Primitive data types: {{code|lang=javascript|code=}} |
|||
Line 183:
</syntaxhighlight>
Note: There is no built-in language literal for undefined. Thus
Functions like this won't work as expected:
Line 198:
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. Surprisingly, {{mono|null}} is considered an object by {{mono|[[typeof]]}}.
<syntaxhighlight lang="javascript">
|