Last active
February 8, 2019 03:34
-
-
Save adatta02/5ecd91f20c438584030a1fd1999cb812 to your computer and use it in GitHub Desktop.
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
let k = ""; | |
for(let i = 0; i < 5; i++){ | |
setTimeout(() => { | |
console.log("k was " + k); | |
k = "hi".repeat(1 + i); | |
}, 1000 * i); | |
}; | |
setInterval(() => { | |
console.log("k is = " + k); | |
}, 500); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment