var mynumber = 2;
console.log(mynumber); //2
mynumber = 3;
console.log(mynumber); //3

{
const a = 3;
let b = 70;
console.log(a, b); //3 70
}
console.log(a, b); //Undefined error....

{
var a = 3;
}
function Test() {
var b = 10;
console.log(b); //10
}
console.log(a); //3
Test();
console.log(b); //b is not defined...

%d bloggers like this: