1//choose the best for your solution
2var myVariable = 22; //this can be a string or number. var is globally defined
3
4let myVariable = 22; //this can be a string or number. let is block scoped
5
6const myVariable = 22; //this can be a string or number. const is block scoped and can't be reassigned
1 Variables can have anything, you define them as equal to something
2
3 eg: var x = 22
4 var statement = 'hello!'
5 var isAbool = true
6
7 there are three types of variables:
81. var
92. let
103. const
11
12var is a normal variable
13let is a variable whose value can be changed eg: let h = 12, h = 10(we changed the value, if you run this, there will be no error)
14const is a variable whose value cannot be changed, if you change the value of a const, you will have errors in you code