Variable
In web programming variables is a core concept that you will use everytime it allow you to store data (objects, functions, string, number, boolean..) that you can use, modify when you want in your code.
Declare variable
let name = "lucas";
let age = 23;
const calculateAge = () => {
return age;
}
const Person = {};
let isAdult = true;
- To declare your variable you have to use
let
orconst
keywords that indicate to the computer that we will create a variable. - This will create in memory and id that we can manipulate, reuse etc..
- Notice that we use the ES6 syntax for declare our variables.
Current errors
This is a list of the main errors that you can meet when you use variable:
Note: I'm not a wizard there is maybe some issue that you notice above so fell free to open an issue in the github repo if you find a new error not mentioned above.