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 trialyoav green
8,611 Pointshow come ernie.owner in now an object?
how come ernie.owner in now an object?,
2 Answers
Steven Parker
231,271 PointsThe whole point of this particular video is to create the "Owner" object, to store information about an owner, and then to reference the owner's object from each pet ("ernie" in this case). So instead of just a name, you can now get the full information about the owner.
yoav green
8,611 Pointsthanks. in addition, was the get function was needed assuming we did not need the .replace method?
Steven Parker
231,271 PointsIf you did not need to modify the phone value, you could omit both the "get" and "set" functions and just call the variable "phone".