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
Matthew Russo3,871 Points
Why not use: console.log(ernie._owner); ?
We added a getter method to get the _owner property and log it to the console, but what are the benefits of doing this? Would console.log(ernie._owner) have worked?
Steven Parker224,872 Points
That would certainly work just to log the owner of this particular object ("ernie"). But the code example is intended to show you how to create getter methods, which in actual practice would likely be used to do more complex things.
ashley needy10,503 Points
I was also wondering this same thing. Glad I looked here.