Created
March 11, 2011 20:23
-
-
Save maritz/866502 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
var test1 = new testModel1(1); // creates a new instance with the id 1 | |
var test2 = new testModel1(2); // creates a new instance with the id 2 | |
test1.p('name', 'test'); // sets this.properties.name to 'test' | |
test2.p('name', 'shit'); // sets this.properties.name to 'shit' | |
console.dir(test1.id); | |
console.dir(test2.id); | |
console.dir(test1.p('name')); // returns this.properties.name |
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
1 | |
2 | |
'shit' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment