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

Pyyhkäise näyttääksesi valikon

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
Tehtävä

Swipe to start coding

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

Ratkaisu

Switch to desktopVaihda työpöytään todellista harjoitusta vartenJatka siitä, missä olet käyttämällä jotakin alla olevista vaihtoehdoista
Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 3. Luku 30

Kysy tekoälyä

expand
ChatGPT

Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme

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
Tehtävä

Swipe to start coding

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

Ratkaisu

Switch to desktopVaihda työpöytään todellista harjoitusta vartenJatka siitä, missä olet käyttämällä jotakin alla olevista vaihtoehdoista
Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 3. Luku 30
Switch to desktopVaihda työpöytään todellista harjoitusta vartenJatka siitä, missä olet käyttämällä jotakin alla olevista vaihtoehdoista
Pahoittelemme, että jotain meni pieleen. Mitä tapahtui?
some-alt