let in Javacript ES-6
Code for this and several other ES-6 features can be found in my github In ES-5 there was only one keyword to declare a variable. The var keyword. The variables declared using the var keyword have function scope. That is, if a variable is declared with in a function, another variable with same name is declared inside a block, the variable declared inside the block overrides the function variable. For example in the following code: var scope = function() { var int = 10; if(int Two variables with the same name int are declared with in the scope function. One is declared at the function level, and another is declared inside the if block. In languages like Java, we will expect both these variables to operate in different scopes. However, all variables declared with the var keyword, have function scope. Which means, the second int will override the first int . Hence the output of this program will be as follows: int value from inside 1...