Skip to content

Instantly share code, notes, and snippets.

@mark-ellul
Created March 3, 2011 21:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mark-ellul/853605 to your computer and use it in GitHub Desktop.
Save mark-ellul/853605 to your computer and use it in GitHub Desktop.
var logCar = function(car) {
console.log("I'm a "+car.color+" "+car.make);
}
var Car = function(make, colour) {
this.make = make;
this.colour = colour;
};
Car.prototype.log = function() { console.log("I'm a "+this.colour+" "+this.make); }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment