Comp 101 Declaration


Declaration uses the "let" keyword to give a names to storage spaces that allow us to store, load, and modify any type of data our programs work with in memory. When we declare a variable, we are saying, "Hey! This variable is called and is of type number!" 

Variable names are there to help us understand our code and its purpose so we want to make them reasonable. For example, you wouldn't name your kid psdneneikn so maybe don't name a variable that either!


Remember, a variable can only be used AFTER its declaration. 

let x: number;
How would you declare a string variable called aaron ?