Skip to content

Instantly share code, notes, and snippets.

@weatheredwatcher
Created June 30, 2010 04:01
Show Gist options
  • Save weatheredwatcher/458225 to your computer and use it in GitHub Desktop.
Save weatheredwatcher/458225 to your computer and use it in GitHub Desktop.
function Car(make, model, carColor){
this.make = make;
this.model = model;
this.carColor = carColor;
alert("Smell That New Car Smell!");
}
Car.prototype.make = 'Car Make';
Car.prototype.model = 'Car Model';
Car.prototype.carColor = 'Car Color';
Car.prototype.goFast() = function {
alert('Let\'s go fast in my ' + this.make + ' ' + this.model);
}
var myCar = new Car('Ford','Mustang','Red');
myCar.goFast();
function Car(make, model, carColor){
this.make = make;
this.model = model;
this.carColor = carColor;
alert("Smell That New Car Smell!");
}
var myCar = new Car('Ford','Mustang','Red');
Car.prototype.make = 'Car Make';
Car.prototype.model = 'Car Model';
Car.prototype.carColor = 'Car Color';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment