Constants Example


Constants can be declared to keep a variable bound to a value.
/* const constHey // Error: const must be initialized. */

const constHey = "hello"
console.log(constHey) // hello
/* constHey = 5 // cannot assign because it's const. */