Skip to content

Instantly share code, notes, and snippets.

@maritz
Created March 11, 2011 20:23
Show Gist options
  • Save maritz/866502 to your computer and use it in GitHub Desktop.
Save maritz/866502 to your computer and use it in GitHub Desktop.
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
1
2
'shit'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment