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 trial

JavaScript

Modify the 'Car' constructor function so that it takes an argument for its model and set its 'model' to the model passed

Forgive me for asking on the forums, but I can't get this blasted question to be right.

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

gives me Bummer! There was an error with your code: SyntaxError: Parse error could someone explain what it wants and how to get there?

2 Answers

This should be the pass for Challenge Task 1 of 3:

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

that worked thanks, why is it yours works, and mine errors?

Not too sure about that. Parse error means you could have forgotten a semi-colon, added an extra character somewhere, or something else. Check out http://jslint.com/ to help you find errors, since Chrome/Firefox dev tools won't be of any use on Treehouse.

Oisin Kilkenny
Oisin Kilkenny
14,213 Points

Hello Andrew, could you give me the link to the challenge?

http://teamtreehouse.com/library/prototypes though I think that might be shortened