Created
March 23, 2013 06:56
-
-
Save aaronfrost/5226739 to your computer and use it in GitHub Desktop.
Arrow Function - 2 - Object
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
// 2. Objects | |
function Foo(){ | |
this.bar = function(){ | |
console.log(this); | |
} | |
return this; | |
} | |
new Foo().bar(); //logs a new Foo object |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment