undefined- a global variable that matters undefined- a data type in itself, which can have only one value. But what is the meaning null?
undefined
null
MDN says :
Null is a literal.
What does it mean?
I know literally how "what you write in your code." Like x = 3 + 4.
Here 3 and 4 will be whole letters. But I do not understand this with what the MDN documentation says.
I am not an expert, but I think you already have the answer: you said that 3 and 4 are “whole letters”. Wikipedia Quotation:
.
So 3 4 , 34 "hello". null , .
3
4
34
"hello"
EDIT: , , , , . T.J. , .
- . null, , , , null, 1 , 1. null : ( Null), 1 - ( Number).
1
, MDN - . , , / . . , , :
null - JavaScript, null "" , .
, . - :
null - .
, , . , , , null , , undefined .
Null JS.
Null
, .
, Null .
, :
typeof null // object (bug in ECMAScript, should be null) typeof undefined // undefined null === undefined // false null == undefined // true
null ,
. null
, , , . .JavaScript null .
, , , . .
JavaScript null .
Primitive( , ) - ,
Primitive
( , ) - ,
4.3.12 null value, -4.3.13 Nullnull
4.3.12 null value
, -
4.3.13 Null