Skip to content

Instantly share code, notes, and snippets.

@asmedrano

asmedrano/scopes.js

Last active Aug 29, 2015
Embed
What would you like to do?
function f(){
console.log(this)
}
// window scope
f()
// object scope
var o = {
'f':f
}
o.f()
// function scope
function wrap(){
f()
}
wrap()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment