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

Sveip for å vise menyen

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

12
let number = null; console.log(number);
copy
Oppgave

Swipe to start coding

Declare a variable selectColor and assign the value of null to the variable and display the value of the variable.

Løsning

Switch to desktopBytt til skrivebordet for virkelighetspraksisFortsett der du er med et av alternativene nedenfor
Alt var klart?

Hvordan kan vi forbedre det?

Takk for tilbakemeldingene dine!

Seksjon 3. Kapittel 30
Vi beklager at noe gikk galt. Hva skjedde?

Spør AI

expand
ChatGPT

Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår

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

12
let number = null; console.log(number);
copy
Oppgave

Swipe to start coding

Declare a variable selectColor and assign the value of null to the variable and display the value of the variable.

Løsning

Switch to desktopBytt til skrivebordet for virkelighetspraksisFortsett der du er med et av alternativene nedenfor
Alt var klart?

Hvordan kan vi forbedre det?

Takk for tilbakemeldingene dine!

Seksjon 3. Kapittel 30
Switch to desktopBytt til skrivebordet for virkelighetspraksisFortsett der du er med et av alternativene nedenfor
Vi beklager at noe gikk galt. Hva skjedde?
some-alt