Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialNazaam Kutisha
7,667 PointsHelp with challenge
Modify the 'Car' constructor function so that it takes an argument for its model and set its 'model' to the model passed in from the argument.
1 Answer
J Scott Erickson
11,883 PointsI don't know that I've done this challenge, but I would assume:
I checked again real quick because I know constructors and prototyping in JavaScript always throw me. Here is my revised answer:
function Car(model){
this.model = model;
}
var someCar = new Car("Ford");
Something to that effect.