Created
November 1, 2015 16:18
-
-
Save gmmorris/0de541412f9d4f510da4 to your computer and use it in GitHub Desktop.
An example of a misuse of a Constructor Function for my How to Grok a Higher Order Class article
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 MyConstructor() { | |
} | |
// meant to be called this way: | |
var myInstance = new MyConstructor(); | |
// but could also be called, usually incorrectly, this way | |
var myInstance = MyConstructor(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment