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!
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

amadeo brands
15,375 PointsQwestion help
function Player() { this.health = 100; }
Player. ........... .pickUpHealth = function() { this.health++; }
Can seem to get it ... I thougt it sould be Player.health.pickUpH....
2 Answers

Steven Parker
225,770 PointsJason! Tsk!
This is a method being added to a constructor function. The property that does this is prototype.
You might want to re-watch the Methods with Prototypes video where this concept is explained.

Jason Anders
Treehouse Moderator 145,854 PointsHmm...
Your answer does seem correct to me as well. But, I've be away from JavaScript for a while. So, asking Andrew Chalkley for assistance. :)
Question # 6 on this quiz
Jason Anders
Treehouse Moderator 145,854 PointsJason Anders
Treehouse Moderator 145,854 PointsWow. "Tsk!" indeed.
I knew my JavaScript was rusty, but that was quite the oversight on my part. Thanks Steven. I will definetly be reviewing the whole course this week.
insert face-palm emoji here
:)