Created
November 28, 2014 10:40
-
-
Save gsans/b76064cce0d910638813 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
//Using standard function definition | |
//note: convention is to use initial capital letter | |
function Order(id) { | |
//new keyword implicit code: var this = {}; | |
this.id = id; | |
//implicit: return this; | |
}; | |
… | |
var order = new Order(1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment