Created
July 1, 2015 21:09
-
-
Save cecchi/d5af0ac0df77cb20e66f to your computer and use it in GitHub Desktop.
This file contains hidden or 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() { | |
this.prop = 'value'; | |
this.bar = function() { | |
return function() { | |
return this.prop; | |
}; | |
}; | |
} | |
var foo = new Foo(); | |
console.log( 'fn', foo.bar() ); | |
console.log( 'prop', foo.bar()() ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment