Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.


No Idea What To Do

Hey guys,

So I am really, really stuck on the first part of the Prototypes Code Challenge. In a nutshell I don't know what to do...

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.

Thanking you in advance

Stu :D

3 Answers

Hey Stu,

I think that what the question is asking for is, given a function:

``` function Car() {


that will take a "model" of Car as an argument:

function Car(model) {

to set (assign) the "model" (arg) taken, as the "model" (property of the constructor):

function Car(model) { this.model = model; }

I hope that helps (and I apologize for all the parens ).

Hey Russell,

Thanks heaps for that, I got it running perfectly thanks to your well written help!

Stu :D

Glad to help. Good luck with the rest.