Created
April 27, 2020 13:55
-
-
Save rishisidhu/a3c12848fe938f72a925e6ef3c9bc7e1 to your computer and use it in GitHub Desktop.
Javascript code to display the scope of let statement
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
// Let scope function | |
function letExample() { | |
for (let i = 0; i < 10; i++) { | |
console.log("i = ", i); | |
} | |
console.log("i outside of scope = ", i); | |
} | |
function go() { | |
letExample(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment