We have another f6 topic, creating constants. This goes along with creating variables because it's a very similar structure. A constant is a container that contains a value. The main difference is you cannot change it once out of value assigned to the container. So let's take a look at this. The syntax for setting up a constant is very similar.
The only difference is instead of var or let use the word const. In the past in JavaScript, when programmers wanted to indicate that a value should not be changed, they would put the variable name in all uppercase letters, then, as they were programming, they would know that this is a constant value. This is a value we do not want to change. That's a good practice to continue. I think when you're using The const keyword to declare a constant. Yes six made it possible so that you can now create a container, a variable type container, that once it is set, it prevents you from making a change to it.
So if we sign this constant pi, the value of 3.14 we can then reference that and it comes back and displays it. But notice that we cannot change it. Even if the change value is correct, it basically gives us an error. So there are situations where you'll want to use a constant something that's unchangeable. In that case, you would want to declare it with const