Created
July 31, 2016 11:09
-
-
Save r-winkler/f09a4967ed4ad5f352255616a167230b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function foo(){ | |
console.log(this.bar); | |
} | |
var o1 = { | |
bar: "bar2", | |
foo: function() { console.log(this.bar);} | |
}; | |
var bar="bar1"; | |
foo(); // bar1 | |
o1.foo(); // bar2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment