let say = 'Hello';
function greeting(){
let name = 'keynene';
return say + ' ' + name;
}
greeting(); → 'Hello keynene'
name; → Reference Error
for(var i = 0; i < 3; i++){
console.log(i);
}
console.log('final : ', i); → 'final : 3'
for(let i = 0; i < 3; i++){
console.log(i);
}
console.log('final : ', i); → Reference Error