Skip to content

Instantly share code, notes, and snippets.

@tylercollier tylercollier/setTimeout.js
Last active May 14, 2019

Embed
What would you like to do?
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
You can’t perform that action at this time.