Var And Let Keyword Difference.
ES6 – introduced in 2015 from this onwords ecamascript team is used year number rather than version number then we have
But when you used let in for block and you going to access outside that block it gives error outside of that block.
If your file at the time of compiling got an error then also your typescript compiler generate the main.js file. By default typescript compiler generate the .js file supported by browser which is ES2015.
At the typical space of let keyword compiler removes that let with var keyword.
Below is the Hello World Video.
In below video explain var and Let difference.