What does it mean to say that “zero is a literal” in JavaScript?

undefined- a global variable that matters undefined- a data type in itself, which can have only one value. But what is the meaning 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.

+4
source share
4 answers

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 , .

EDIT: , , , , . T.J. , .

+1

- . null, , , , null, 1 , 1. null : ( Null), 1 - ( Number).

, MDN - . , , / . . , , :

null - JavaScript, null "" , .

, . - :

null - .

, , . , , , null , , undefined .

+10

Null JS.

, .

, Null .

, :

typeof null        // object (bug in ECMAScript, should be null)
typeof undefined   // undefined
null === undefined // false
null  == undefined // true
+1

null ,

. null

, , , . .

JavaScript null .


Primitive

( , ) - ,


4.3.12 null value

, -

4.3.13 Null

null

+1

All Articles