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
1var user_name = prompt("Please enter your name:", "Type here");
2alert("Hello " + user_name);
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
1var myString = "string"; //var can be redefined
2var myInt = 34; //var can be redefined
3const myString2 = "string"; //const cannot be redefined
4const myInt2 = 69; //const cannot be redefined
1// This is best way to make a variable
2// Varibales Store Data
3var variable1 = 56;
4//OR
5var variable2 = true;
6
7var variable3 = "Hello World";