Skip to content

Instantly share code, notes, and snippets.

@twyatt
Created October 10, 2009 04:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save twyatt/206596 to your computer and use it in GitHub Desktop.
Save twyatt/206596 to your computer and use it in GitHub Desktop.
Car = function() {
this.color = 'red';
alert('car was made');
}
Truck.prototype = new Car();
Truck = function() {
// how do I call the parent constructor (i.e. make the alert box appear)
}
t = new Truck();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment