Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Impara Null | Data Types and Variables
Introduction to JavaScript

book
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 the undefined).

let number = null;
console.log(number);
12
let number = null; console.log(number);
copy
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

let selectColor = null;
console.log(selectColor);

Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 3. Capitolo 30
single

single


Chieda ad AI

expand

Chieda ad AI

ChatGPT

Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione

We use cookies to make your experience better!
some-alt