Created
August 2, 2016 17:49
-
-
Save VictorMedeiros/5d15215b04d00183ee4f94063062455a 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 MyCat(name) { | |
this.catName = name; | |
} | |
MyCat.prototype.sayCatName = () => { | |
console.log(this === window); // => true | |
return this.catName; | |
}; | |
var cat = new MyCat('Mew'); | |
cat.sayCatName(); // => undefined |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment