diff between var and Let
the diff is scope
let has an inner scope
var is used to declare a global variable
// let b = "rahul";
for(let b=1;b<11;b++){
console.log(b);
}
console.log("b is:"+b);
the diff is scope
let has an inner scope
var is used to declare a global variable
// let b = "rahul";
for(let b=1;b<11;b++){
console.log(b);
}
console.log("b is:"+b);
0 comments:
Post a Comment