Created
January 23, 2016 09:42
-
-
Save pangers/a3a9ebc72df3014a74a1 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
var vet = { | |
dog: "Max", | |
returnMax: function() { | |
return this.dog; | |
} | |
} | |
vet.returnMax(); // "Max" | |
var newReturnMax = vet.returnMax; | |
newReturnMax(); // returns the dog property of the global object, otherwise returns undefined. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment