Skip to content

Instantly share code, notes, and snippets.

@hglattergotz
Created November 11, 2011 01:05
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 hglattergotz/1356809 to your computer and use it in GitHub Desktop.
Save hglattergotz/1356809 to your computer and use it in GitHub Desktop.
Homework 1.2
function Car(make, color) {
return {
make: arguments[0],
color: arguments[1],
log : function() {
console.log("I'm a " + this.color + " " + this.make);
}
};
}
(new Car('Trabi', 'brown')).log();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment