Last active
September 7, 2021 12:09
-
-
Save leodevbro/0e5b8d405e1039e2b96115411f8eedcc 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
let a = {v: 0}; | |
let parentFn = () => { | |
let z = a; | |
let childFn = () => { | |
console.log(z.v); | |
}; | |
return(childFn); | |
}; | |
let myFn = parentFn(); | |
myFn(); | |
a.v = 4; | |
myFn(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment