No matter what you decide, don’t ever stop learning and use your knowledge to make the best decision possible.
The main lesson is this: you can never know enough about something. When you use things like variables, let, or const you are learning how to use them. But as you learn more about them, you become more and more confident and comfortable with them.
For example, I recently decided to use const to manage a game’s inventory. I thought it was a good idea because you shouldn’t be able to accidentally lose or put something in your inventory that you wouldn’t want to see again. However, I soon realized that the decision to const was making this mistake. I realized that when something was in my inventory, I didn’t really care what it was but I had to keep it in.
When you start to use const you start to learn about yourself. When you start to use let, you start to learn how to use the value of a variable. When you start to use those two things, you get a more confident and comfortable with them. For example, I recently decided to use const to manage a games inventory. I thought it was a good idea because you shouldnt be able to accidentally lose or put something in your inventory that you wouldnt want to see again.
I had to stop myself from saying, “Well, that is a good idea that you shouldnt do.” I don’t know. It might help if I said, “I think you should try to do this,” but it doesn’t really help me.
The first time I heard the phrase const, I thought to myself, I can do this! I think I can do this! I really do! I got it! Now it is time to step into the breach and make a decision. Let’s try it.
It looks like const means that the variable can be assigned to and the value of the variable can be accessed like a normal variable, but that it can also be assigned to and the value of the variable can be accessed like a regular variable.
Let is short for “let”. It is a keyword that can be used in variable declaration, but it is also used to access the value of the variable. What does it mean for a variable to be a variable, and then access the value of that variable like a normal variable, or to assign the value of that variable to a variable? When we do, we are just referencing a regular variable.