Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist
View gist:988857
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
function Parent(first, last) {
this.first = first;
this.last = last;
this.coordinates = [0, 0];
}
 
Parent implements {
speak: function (message) {
return this.first + ' ' + this.last + ': ' + message;
},
walk: function (horizontal, vertical) {
var coordinates = this.coordinates;
coordinates[0] += horizontal;
coordinates[1] += vertical;
return coordinates;
}
};
 
function Child(first, last) extends Parent {
super(first, last);
}
 
Child implements {
speak: function (message) {
return super(message).toUpperCase();
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.