Rasi
answered Nov 30 '-1 00:00
let statement define variable to particular that scope
let d='n';
{
let d='name';
console.log(d);//name
}
console.log(d);//n
both d is not same here . its differ variable at differ stage. { } is enclose differ block , in which let d is differ new variable.
where var statement define it globally , let statement define locally
let make variable to private in closure.