Null
In JavaScript
, null
is marked as one of the primitive values
, because its behavior is seemingly primitive. However, when using the
typeof
operator, it returns "object"
.
console.
log
(
typeof
null
)
;
// "object"
This is considered a bug , but one which cannot be fixed because it will break too many scripts.
See also
- JavaScript data types
-
The JavaScript global object:
null
- Null pointer on Wikipedia
- Glossary