About
In this code snippet, we’ll learn about the const keyword in Javascript.
The const keyword does almost exactly the same thing to a variable as the let keyword. You can read more about let in this post. The difference is it also makes the variable a constant meaning it can only have its value assigned once.
Let’s see the example below.
Code:
const number = 5; //number = 5; //This won't work with const variables.