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//You can make a variable by using:
2var variable-name = 'defenition of the variable';
3// Or you can use
4let variable-name = 'defenition of the variable';
1// let & var are both editable variables:
2var cow = 'moo';
3let pig = 'oink';
4cow = 10;
5pig = 10;
6// const is a permanent variable; you cannot change it.
7const uncuttableGrass = '\/\/';
8uncuttableGrass = '___';
9// above throws an error
1//variables are a way to easily store data in javascript
2//variables are declared by the var keyword, example...
3var x = 10;
4//or
5var dog_name = "daisy";
6//which can also be written as
7var dog_name = 'daisy';
8//same thing with single quotes and double quotes