Created
February 2, 2020 12:27
-
-
Save tanisha03/3d7aa4d71c7828604143e6865c3158f8 to your computer and use it in GitHub Desktop.
Understanding Lexical Scoping
This file contains hidden or 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 greet(){ | |
| name="Tanisha"; //local variable for greet() | |
| function sayHello(){ //inner function | |
| alert("Hello"+name); //access to the variable | |
| } | |
| sayHello(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment