Created
February 5, 2016 03:10
-
-
Save vtno/0b8d034d918ba22d47a9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function howVarWorks() | |
{ | |
//i is also visible here. | |
for( var i = 0 ; i<10 ;i++) | |
{ | |
//i is visible everywhere in the function | |
} | |
//i is also visible here. | |
} | |
function howLetWorks() | |
{ | |
//j is *not* visible here. | |
for(let j = 0 ; j<10 j++) | |
{ | |
//j is only visible here. | |
} | |
//j is *not* visible here. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment