Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lernen Task - Declaring & Using Constants | Manipulating Data
Introduction to JavaScript
course content

Kursinhalt

Introduction to JavaScript

Introduction to JavaScript

1. Getting Started
2. Manipulating Data
3. Conditional Statements

book
Task - Declaring & Using Constants

Aufgabe

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.

Your task is to:

  • Declare a constant called MONTHLY_PRICE which stores the value 9.99;

💡 Tip: 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ösung

Switch to desktopWechseln Sie zum Desktop, um in der realen Welt zu übenFahren Sie dort fort, wo Sie sind, indem Sie eine der folgenden Optionen verwenden
War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 2. Kapitel 7
toggle bottom row

book
Task - Declaring & Using Constants

Aufgabe

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.

Your task is to:

  • Declare a constant called MONTHLY_PRICE which stores the value 9.99;

💡 Tip: 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ösung

Switch to desktopWechseln Sie zum Desktop, um in der realen Welt zu übenFahren Sie dort fort, wo Sie sind, indem Sie eine der folgenden Optionen verwenden
War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 2. Kapitel 7
Switch to desktopWechseln Sie zum Desktop, um in der realen Welt zu übenFahren Sie dort fort, wo Sie sind, indem Sie eine der folgenden Optionen verwenden
Wir sind enttäuscht, dass etwas schief gelaufen ist. Was ist passiert?
some-alt