Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Apprendre Constant Naming Convention | JavaScript syntax
Introduction to JavaScript (staging)

bookConstant Naming Convention

Constant naming convention

Constants are planned to be non-changing variables. It is best to practice to distinguish constants from other variables and the best way to write them is in UPPERCASE (capital letters).

123456
// UPPERCASE const SECONDS = 60; const MINUTES = 60; const HOURS = 24; const DAY = SECONDS * MINUTES * HOURS; console.log(DAY);
copy
Tâche

Swipe to start coding

Store the value of pi in the constant and name it with an uppercase and show it on the console.

Solution

Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 2. Chapitre 10
single

single

Demandez à l'IA

expand

Demandez à l'IA

ChatGPT

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

close

bookConstant Naming Convention

Glissez pour afficher le menu

Constant naming convention

Constants are planned to be non-changing variables. It is best to practice to distinguish constants from other variables and the best way to write them is in UPPERCASE (capital letters).

123456
// UPPERCASE const SECONDS = 60; const MINUTES = 60; const HOURS = 24; const DAY = SECONDS * MINUTES * HOURS; console.log(DAY);
copy
Tâche

Swipe to start coding

Store the value of pi in the constant and name it with an uppercase and show it on the console.

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 10
single

single

some-alt