Skip to content

Instantly share code, notes, and snippets.

@tnhu
Created March 13, 2012 12:13
Show Gist options
  • Select an option

  • Save tnhu/2028434 to your computer and use it in GitHub Desktop.

Select an option

Save tnhu/2028434 to your computer and use it in GitHub Desktop.
JSFaceTest
var JSFacePerson = jsface.Class({
constructor: function(name) {
this.name = name;
},
setAddress: function(country, city, street) {
this.country = country;
this.city = city;
this.street = street;
},
sayHello: function() {
console.log('I am ' + this.name + '. My address is ' +
this.country + ', ' + this.city + ', ' + this.street + '.');
}
});
var JSFaceFrenchGuy = jsface.Class(JSFacePerson, {
constructor: function(name) {
this.$super(name);
},
setAddress: function(city, street) {
this.$super('France', city, street);
}
});
var JSFaceParisLover = jsface.Class(JSFaceFrenchGuy, {
constructor: function(name) {
this.$uper(name);
},
setAddress: function(street) {
this.$super('Paris', street);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment