Created
October 27, 2013 00:14
-
-
Save chamix/7176244 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(model, year, color){ | |
this.model=model; | |
this.color=color; | |
this.year=year; | |
this.getInfo=getcarInfo; | |
}; | |
function getCarInfo(){ | |
return this.model + " | " + this.year + " | " + this.color; | |
}; | |
var myCar=new car("Citroen C4","2012","negro"); | |
console.log(myCar.getInfo()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment