Global variable
// global variable
var age= 25 ;
//accessing in all the below functions, classes etc
{
console.log(age);
}
if(true){
console.log(age);
}
for(let i=0 ; i<5 ;i++){
console.log(age);
}
{
age = age +1 ;
}
//here is the backlash of global //variable
//it should be updated at any point
//and the actual value of global variable is been updated
console.log(age);