Null
What is Null
The data type null
represents that there is no value. It is a primitive value in javascript.
To have a better understanding of null
, we must know these two features about null
:
null
provides the non-existent value or empty value.null
has to be assigned to a variable as it is not assigned by default (unlike theundefined
).
9
1
2
let number = null;
console.log(number);
12let number = null; console.log(number);
Compito
Swipe to start coding
Declare a variable selectColor
and assign the value of null
to the variable and display the value of the variable.
Soluzione
9
1
2
let selectColor = null;
console.log(selectColor);
Tutto è chiaro?
Grazie per i tuoi commenti!
Sezione 3. Capitolo 30
single
9
1
Chieda ad AI
Chieda ad AI
Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione