Created
June 30, 2010 04:01
-
-
Save weatheredwatcher/458225 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Car(make, model, carColor){ | |
this.make = make; | |
this.model = model; | |
this.carColor = carColor; | |
alert("Smell That New Car Smell!"); | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var myCar = new Car('Ford','Mustang','Red'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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