Skip to content

Instantly share code, notes, and snippets.

@vmarchesin
Created September 11, 2018 20:51
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 vmarchesin/8c3d2763f3b19598e24c4d6182f5431f to your computer and use it in GitHub Desktop.
Save vmarchesin/8c3d2763f3b19598e24c4d6182f5431f to your computer and use it in GitHub Desktop.
Javascript Arrow Functions and Closure
sitAndBark() {
setTimeout((function() { console.log(`Woof, my name is ${this.name}`) }).bind(this), 1000)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment