Hosting Solutions
mobile_logo Table of Contents


The const statement is used to create constants. Unlike variables, constants are used to represent values that will not change during script execution. Using all uppercase letters in the names will help you and others identify it as a constant.

Syntaxconst NAME = value;
const SPEED = 1000; alert( SPEED );

Authors use constants when they are sure that the values they represent, will not need to change in a script.



breakconstcontinuedo whileforfor inif elselabelreturnswitchtry catchvarwhilewith