Created
July 7, 2016 11:11
-
-
Save bingluen/9091e70d744db9421e7ff97ca6043129 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
var a = 0; | |
console.log("Line 3, a =", a); | |
var fun1 = (() => { | |
console.log("fun1, Line 6, a =", a); | |
}) | |
var fun2 = (() => { | |
console.log("fun2, Line 10, a =", a); | |
a++; | |
console.log("fun2, Line 12, a =", a); | |
}); | |
fun1(); | |
setTimeout(()=> { | |
console.log("setTimeout callback, Line 18, a =", a); | |
a++; | |
console.log("setTimeout callback, Line 20, a =", a); | |
fun2(); | |
}, 1000) | |
fun1(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment