Skip to content

Instantly share code, notes, and snippets.

@tylercollier
Last active May 14, 2019 21:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tylercollier/e74692348621e05d21ff7d6b2dfff784 to your computer and use it in GitHub Desktop.
Save tylercollier/e74692348621e05d21ff7d6b2dfff784 to your computer and use it in GitHub Desktop.
medium-article-closures
const message = 'hello from a closure'
setTimeout(() => {
console.log(message)
}, 1000)
// or, same thing on one line
setTimeout(() => console.log(message), 1000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment