Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lernen JavaScript Variables | JavaScript syntax
Introduction to JavaScript

Swipe um das Menü anzuzeigen

book
JavaScript Variables

In JavaScript, variables are used to store data. JavaScript variables are “named storage” for data. We can access the value of the variable by using variable name. We can use the variables to store different kinds of data like numbers, text, Boolean, etc.

JavaScript variables syntax:

A variable in JavaScript has a name, a value, and a memory address.

  • The name of the variable distinctively identifies the variable.

  • The value refers to data stored in the variable.

  • The memory address refers to the memory location of the variable.

12
const climate ="spring"; console.log(climate);
copy
Aufgabe

Swipe to start coding

Create two variables named firstValue, and secondValue. Assign 50 to firstValue and 20 to secondValue and print both the variables using the console.log() function.

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 2
Wir sind enttäuscht, dass etwas schief gelaufen ist. Was ist passiert?

Fragen Sie AI

expand
ChatGPT

Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen

book
JavaScript Variables

In JavaScript, variables are used to store data. JavaScript variables are “named storage” for data. We can access the value of the variable by using variable name. We can use the variables to store different kinds of data like numbers, text, Boolean, etc.

JavaScript variables syntax:

A variable in JavaScript has a name, a value, and a memory address.

  • The name of the variable distinctively identifies the variable.

  • The value refers to data stored in the variable.

  • The memory address refers to the memory location of the variable.

12
const climate ="spring"; console.log(climate);
copy
Aufgabe

Swipe to start coding

Create two variables named firstValue, and secondValue. Assign 50 to firstValue and 20 to secondValue and print both the variables using the console.log() function.

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