Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Challenge: Declaring & Using Constants | Manipulating Data
Introduction to JavaScript

Sveip for å vise menyen

book
Challenge: Declaring & Using Constants

Oppgave

Swipe to start coding

You're building a subscription management system for a new streaming service. The program calculates the totalCost of the subscription based on the number of devices the user has (userDevice) and a fixed monthly price:

Declare a constant called MONTHLY_PRICE which stores the value 9.99.

Note

In most programming languages, constants are typically written in all uppercase letters, with words separated by underscores (_). This naming convention helps differentiate constants from regular variables and makes them easily recognizable in the code.

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 2. Kapittel 7
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
Challenge: Declaring & Using Constants

Oppgave

Swipe to start coding

You're building a subscription management system for a new streaming service. The program calculates the totalCost of the subscription based on the number of devices the user has (userDevice) and a fixed monthly price:

Declare a constant called MONTHLY_PRICE which stores the value 9.99.

Note

In most programming languages, constants are typically written in all uppercase letters, with words separated by underscores (_). This naming convention helps differentiate constants from regular variables and makes them easily recognizable in the code.

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 2. Kapittel 7
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