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

Pyyhkäise näyttääksesi valikon

book
Challenge: Declaring & Using Constants

Tehtävä

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.

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

Kysy tekoälyä

expand
ChatGPT

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

book
Challenge: Declaring & Using Constants

Tehtävä

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.

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