javascript variables

JavaScript
//choose the best for your solution
var myVariable = 22; //this can be a string or number. var is globally defined

let myVariable = 22; //this can be a string or number. let is block scoped

const myVariable = 22; //this can be a string or number. const is block scoped and can't be reassignedvar num = 1:var Number = 5;
var String = "Hi!";
var boolen1 = true;
var boolen2 = false;
var array = [11, "Hi!", true];
var object = {age:11, speach:"Hi!", likes_Bananas:true};var variable = 10;

function start() {
  variable = 20;
}
console.log(variable + 20);

// Answer will be 40 since the variable was changed in the functionvar is a keyword to define the varible in js but as of es-6 we, use let and const keywords for the same// Also let, const
var e_number = 0;
var e_string = '';
var e_true = true;
var e_false = false;
var e_undefined = undefined;
Source

Also in JavaScript: