Graham's Easy Models
function Person() {
var secret = 'I still pick my nose and I am 26 years old.'; // just a private variable
this.prenom = 'Graham';
this.nom = 'Robertson';
this.surnom = 'Ham';
this.age = 26;
// Extend a Gem!
this.extend = Gem;
this.extend();
};
var graham = new Person();
graham.subscribe('age', function(val) {
alert('Wow! ' + graham.prenom + ' a ' + val + ' ans là. Très cool!');
});
graham.age = 27; // Not until September 14th, 2015 though...
Have fun :)