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

Svep för att visa menyn

book
Challenge: Declaring & Using Constants

Uppgift

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 desktopByt till skrivbordet för praktisk övningFortsätt där du är med ett av alternativen nedan
Var allt tydligt?

Hur kan vi förbättra det?

Tack för dina kommentarer!

Avsnitt 2. Kapitel 7

Fråga AI

expand
ChatGPT

Fråga vad du vill eller prova någon av de föreslagna frågorna för att starta vårt samtal

book
Challenge: Declaring & Using Constants

Uppgift

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 desktopByt till skrivbordet för praktisk övningFortsätt där du är med ett av alternativen nedan
Var allt tydligt?

Hur kan vi förbättra det?

Tack för dina kommentarer!

Avsnitt 2. Kapitel 7
Switch to desktopByt till skrivbordet för praktisk övningFortsätt där du är med ett av alternativen nedan
Vi beklagar att något gick fel. Vad hände?
some-alt