javascript q2 | var vs let | hoisting | javascript code execution #shorts



#shorts
javascript interview questions and answers for freshers

I explained in detail how following code is executed by javascript engine:

function hello() {
console.log(name);
console.log(age);
var name = “rizwan”;
let age = 21;
}
hello()