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

Glissez pour afficher le menu

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
Tâche

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.

Solution

Switch to desktopPassez à un bureau pour une pratique réelleContinuez d'où vous êtes en utilisant l'une des options ci-dessous
Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 2. Chapitre 2
Nous sommes désolés de vous informer que quelque chose s'est mal passé. Qu'est-il arrivé ?

Demandez à l'IA

expand
ChatGPT

Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion

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
Tâche

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.

Solution

Switch to desktopPassez à un bureau pour une pratique réelleContinuez d'où vous êtes en utilisant l'une des options ci-dessous
Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 2. Chapitre 2
Switch to desktopPassez à un bureau pour une pratique réelleContinuez d'où vous êtes en utilisant l'une des options ci-dessous
Nous sommes désolés de vous informer que quelque chose s'est mal passé. Qu'est-il arrivé ?
some-alt