Skip to content

Instantly share code, notes, and snippets.

@gmmorris
Created November 1, 2015 16:18
Show Gist options
  • Save gmmorris/0de541412f9d4f510da4 to your computer and use it in GitHub Desktop.
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
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