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
Pratibha Soni
7,561 PointsJavaScript foundation - prototypes : challenge 1
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.
This is the question, where I am struck and not able to understand what to write in here to pass this challenge... Please help
4 Answers
Pratibha Soni
7,561 PointsThank for replying, I have passed that question but struck on the third question......It would be really appreciated if you will help. The third question is from the same section...which is....Modify the Car's prototype to have 'wheels' set to 4.
My answer for this is : function Car(model) { this.model = model; }
Car.prototype = carPrototype;
Car.prototype.wheels = new "4";
Giovanni CELESTE
20,961 PointsCould you please write your code here? I could give you the answer, but I think it wouldn't be productive for your learning. Then I might give you some hints. What I can tell you for helping you is this Video with the answer, you can mimic the explanation about the personPrototype. Tell me if you could advance with that :).
Steve Linn
11,841 Pointsadd it to the var carPrototype after model
Pratibha Soni
7,561 PointsThanks for the reply, I have already passed this quiz......anyways thanks for the response...
James Barnett
39,199 PointsJames Barnett
39,199 PointsIt's hard for us to know what issue you are having if you don't show us your code. For some tips on how to do that, check out the tips for asking questions video located in the right hand sidebar.
Also without a link to the code challenge you are having issues with someone would have guess which one it is, to be able to test out their solution.