Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lära Constant Naming Convention | JavaScript syntax
Introduction to JavaScript

Svep för att visa menyn

book
Constant 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
Uppgift

Swipe to start coding

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

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

single

Fråga AI

expand

Fråga AI

ChatGPT

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

close

Awesome!

Completion rate improved to 2

book
Constant 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
Uppgift

Swipe to start coding

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

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!

close

Awesome!

Completion rate improved to 2

Svep för att visa menyn

some-alt