-
-
Save mahdavipanah/f80a0c5cd6270f8bb6965d8aff6a8354 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
const called = (function () { | |
let count = 0 | |
return () => { | |
count++ | |
console.log(`Called: ${count}`) | |
} | |
})() | |
called() // Called: 1 | |
called() // Called: 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment