why does let a= 10; var a= 10;
throws error that 'a' cannot be re-declared , as much i know , let variable becomes part of script object in js and var becomes part of global object. then why do i get to see this error?
I think it has something to do with block and functional scoping but somehow i'm not able to use that in this context.