Skip to content

Instantly share code, notes, and snippets.

@bayleedev
Created June 17, 2016 14:12
Show Gist options
  • Save bayleedev/ea5ab3eb0df0fed923e38439f28ccd55 to your computer and use it in GitHub Desktop.
Save bayleedev/ea5ab3eb0df0fed923e38439f28ccd55 to your computer and use it in GitHub Desktop.
var foo = {
name: 'blaine',
bar: function() {
console.log(this) // { name: 'blaine' }
}
}
var bar = foo.bar // window
var baz = {
name: 'jim',
bar: foo.bar // { name: 'jim' }
}
foo.bar()
bar()
baz.bar()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment