Variables in programming are value containers. You can store whatever value you have in a variable. When you create a variable in a programming language, it is called “declaring”.
Make sure you include a semicolon at the end of every sentence unlike Python where you shall not.
After variable declaration, variables usually have no value. So they have what is called undefined which means they have no defined value till now. So, whenever you use a variable with undefined value in an operation, you shall get an error.
Storing a value in a variable is called assignment operation. This happens when you append an equal sign after the variable declaration and then storing whatever you need to store.
For instance “var x = 3;”. You can declare as many variables in one statement as you want. You just start with the var keyword and separate the different variables by using commas.