Created
February 1, 2016 06:15
-
-
Save eshacker/4d9685d244721de3bda8 to your computer and use it in GitHub Desktop.
A very short study in this of JavaScript
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 Namer(){ | |
console.log(this instanceof Namer); | |
} | |
Namer(); // false | |
new Namer(); // true | |
Namer.call(Namer.prototype); // false | |
Namer.call(new Namer); // true true | |
Namer.call(Namer); // false | |
Namer.call(Object.create(Namer.prototype)); // true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment