//choose the best for your solutionvar myVariable = 22; //this can be a string or number. var is globally definedlet myVariable = 22; //this can be a string or number. let is block scopedconst myVariable = 22; //this can be a string or number. const is block scoped and can't be reassigned
//You can make a variable by using:var variable-name = 'defenition of the variable';
// Or you can use
let variable-name = 'defenition of the variable';
// write what ever you want// one way is// this is to declare intigersvar a = 10;
//this is to declare strings aka wordsvar b = "hi";
// the key word var can be replaced by let//like thislet a = 10;
let b = "hi";
// i recomend using let insted of var
// let & var are both editable variables:var cow = 'moo';
let pig = 'oink';
cow = 10;
pig = 10;
// const is a permanent variable; you cannot change it.const uncuttableGrass = '\/\/';
uncuttableGrass = '___';
// above throws an error