🤑 Join the Treehouse affiliate program and earn 25% recurring commission!

New No-Code Track! 🚀 New videos dropping every week—start learning today!

🌟 Dreaming of a bright future? 🎓 Ask about the Treehouse Scholarship program! 🚀

✨ Earn college credits in Cybersecurity, JS, HTML, CSS and Python

  • Treehouse Logo
  • Plans
    Chevron
    • For Individuals
    • For Businesses
    • For Schools
    • For Libraries
    • For Military
  • Library
    Chevron
    • All Courses
    • Tracks
    • College Credit
  • Techdegree
    Chevron
    • Overview
    • Front End Development
    • Full Stack JavaScript
    • Data Analysis
    • UX Design
    • Python
  • Community
    Chevron
    • Community Projects
    • Live Sessions
    • Code Adventures
    • Discord
    • Forum
    • Success Stories
    • Treehouse Links
    • 100 Days of Code
  • Resources
    Chevron
    • Career Toolbox
    • CodeForward
    • Free Treehouse Near Me
    • Jobs
    • Blog
    • Support
    • About
  • For Individuals For Businesses For Schools For Libraries For Military
  • All Courses Tracks College Credit
  • Overview Front End Web Development Full Stack JavaScript Python Development Data Analysis UX Design
  • Community Projects Live Sessions Code Adventures Discord Forum Success Stories Treehouse Links 100 Days of Code
  • Career Toolbox CodeForward Free Treehouse Near Me Jobs Blog Support About
  • Sign In
  • Free Trial
Instagram Twitter Facebook YouTube LinkedIn
    • Newest
      • Newest
      • Active
      • Unanswered
      • Featured
    • All Topics
      • All Topics
      • • General Discussion
      • • AI
      • • Android
      • • APIs
      • • Coding for Kids
      • • College Credit
      • • Computer Science
      • • CSS
      • • Data Analysis
      • • Databases
      • • Design
      • • Development Tools
      • • Digital Literacy
      • • Game Development
      • • Go Language
      • • HTML
      • • Java
      • • JavaScript
      • • Learning Resources
      • • Machine Learning
      • • No-Code
      • • PHP
      • • Professional Growth
      • • Python
      • • Quality Assurance
      • • React
      • • Ruby
      • • Security
      • • Swift
  • Tsipporah Christopher
    seal-mask
    .a{fill-rule:evenodd;}techdegree seal-36
    Tsipporah Christopher
    Full Stack JavaScript Techdegree Graduate 15,593 Points

    phone.replace() doesn't work, and when I try to return the phone it comes back undefined

    Posted September 18, 2022 3:32am by Tsipporah Christopher
    .a{fill-rule:evenodd;}techdegree seal-36
    Tsipporah Christopher
    Full Stack JavaScript Techdegree Graduate 15,593 Points
    • JavaScript
    • Object-Oriented JavaScript
    • Getters and Setters
    • Object Interaction

    1 Answer

  • Naoki Yoshida
    Naoki Yoshida
    6,984 Points

    Phone property results undefined, help!

    Posted January 26, 2022 11:16am by Naoki Yoshida
    Naoki Yoshida
    6,984 Points
    • JavaScript
    • Object-Oriented JavaScript
    • Getters and Setters
    • Object Interaction

    2 Answers

  • karan Badhwar
    seal-mask
    .a{fill-rule:evenodd;}techdegree seal-36
    karan Badhwar
    Web Development Techdegree Graduate 18,135 Points

    Get owner()

    Posted December 17, 2021 12:21am by karan Badhwar
    .a{fill-rule:evenodd;}techdegree seal-36
    karan Badhwar
    Web Development Techdegree Graduate 18,135 Points
    • JavaScript
    • Object-Oriented JavaScript
    • Getters and Setters
    • Object Interaction

    1 Answer

  • Amanda Richardson
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Amanda Richardson
    Web Development Techdegree Student 13,776 Points

    defining this._phone in the setter method

    Posted October 15, 2021 4:36pm by Amanda Richardson
    .a{fill-rule:evenodd;}techdegree
    Amanda Richardson
    Web Development Techdegree Student 13,776 Points
    • JavaScript
    • Object-Oriented JavaScript
    • Getters and Setters
    • Object Interaction

    1 Answer

  • Romeo Kiss
    Romeo Kiss
    7,355 Points

    Is there a possibility for teacher Ashley to redo the courses?

    Posted September 7, 2021 11:09am by Romeo Kiss
    Romeo Kiss
    7,355 Points
    • JavaScript
    • Object-Oriented JavaScript
    • Getters and Setters
    • Object Interaction

    3 Answers

  • Nas Jones
    Nas Jones
    7,849 Points

    Code not working

    Posted May 6, 2021 6:42am by Nas Jones
    Nas Jones
    7,849 Points
    • JavaScript
    • Object-Oriented JavaScript
    • Getters and Setters
    • Object Interaction

    1 Answer

  • Kirt Perez
    Kirt Perez
    7,374 Points

    Why is the replace method not working for me?

    Posted April 22, 2021 10:36pm by Kirt Perez
    Kirt Perez
    7,374 Points
    • JavaScript
    • Object-Oriented JavaScript
    • Getters and Setters
    • Object Interaction

    1 Answer

  • Junior Aidee
    seal-mask
    .a{fill-rule:evenodd;}techdegree seal-36
    Junior Aidee
    Front End Web Development Techdegree Graduate 14,657 Points

    I keep getting an error on the console when trying to run my code

    Posted November 11, 2020 4:08am by Junior Aidee
    .a{fill-rule:evenodd;}techdegree seal-36
    Junior Aidee
    Front End Web Development Techdegree Graduate 14,657 Points
    • JavaScript
    • Object-Oriented JavaScript
    • Getters and Setters
    • Object Interaction

    2 Answers

  • Jonathan Ambriz
    PLUS
    Jonathan Ambriz
    Courses Plus Student 3,902 Points

    RangeError: Maximum call stack size exceeded

    Posted September 13, 2020 11:45am by Jonathan Ambriz
    Jonathan Ambriz
    Courses Plus Student 3,902 Points
    • JavaScript
    • Object-Oriented JavaScript
    • Getters and Setters
    • Object Interaction

    1 Answer

  • Muhammad Ali
    Muhammad Ali
    6,752 Points

    Can not set property of Undefined.Why??

    Posted September 10, 2020 4:22am by Muhammad Ali
    Muhammad Ali
    6,752 Points
    • JavaScript
    • Object-Oriented JavaScript
    • Getters and Setters
    • Object Interaction

    1 Answer

  • Gena Aivazian
    Gena Aivazian
    16,574 Points

    TypeError: Cannot set property 'phone' of undefined at Object. I dont know what's wrong in my code

    Posted May 15, 2020 12:01pm by Gena Aivazian
    Gena Aivazian
    16,574 Points
    • JavaScript
    • Object-Oriented JavaScript
    • Getters and Setters
    • Object Interaction

    1 Answer

  • Mohamad Faiz Khairi Mohd Nazri
    Mohamad Faiz Khairi Mohd Nazri
    5,668 Points

    Why do we need the getter method for the setter method?

    Posted April 22, 2020 1:51pm by Mohamad Faiz Khairi Mohd Nazri
    Mohamad Faiz Khairi Mohd Nazri
    5,668 Points
    • JavaScript
    • Object-Oriented JavaScript
    • Getters and Setters
    • Object Interaction

    1 Answer

  • Hamzah Iqbal
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Hamzah Iqbal
    Full Stack JavaScript Techdegree Student 11,145 Points

    Cannot set property number of #<Owner> which has only a getter

    Posted March 28, 2020 6:27pm by Hamzah Iqbal
    .a{fill-rule:evenodd;}techdegree
    Hamzah Iqbal
    Full Stack JavaScript Techdegree Student 11,145 Points
    • JavaScript
    • Object-Oriented JavaScript
    • Getters and Setters
    • Object Interaction

    1 Answer

  • Julianna Kahn
    Julianna Kahn
    20,702 Points

    I can't tell from this video, is the Owner class being created "inside" the Pet class.

    Posted May 8, 2019 8:30pm by Julianna Kahn
    Julianna Kahn
    20,702 Points
    • JavaScript
    • Object-Oriented JavaScript
    • Getters and Setters
    • Object Interaction

    3 Answers

  • Chapman Cheng
    seal-mask
    .a{fill-rule:evenodd;}techdegree seal-36
    Chapman Cheng
    PHP Development Techdegree Graduate 46,936 Points

    Might be great to add link to the new "regular expression course" in teacher's note

    Posted March 11, 2019 9:49pm by Chapman Cheng
    .a{fill-rule:evenodd;}techdegree seal-36
    Chapman Cheng
    PHP Development Techdegree Graduate 46,936 Points
    • JavaScript
    • Object-Oriented JavaScript
    • Getters and Setters
    • Object Interaction

    0 Answers

  • hector alvarado
    hector alvarado
    15,796 Points

    What does the set method inside pet looks for?

    Posted November 25, 2018 7:26am by hector alvarado
    hector alvarado
    15,796 Points
    • JavaScript
    • Object-Oriented JavaScript
    • Getters and Setters
    • Object Interaction

    1 Answer

  • Fabricio Policarpo
    Fabricio Policarpo
    8,674 Points

    errors after class Owner

    Posted November 23, 2018 3:17am by Fabricio Policarpo
    Fabricio Policarpo
    8,674 Points
    • JavaScript
    • Object-Oriented JavaScript
    • Getters and Setters
    • Object Interaction

    1 Answer

  • baderbouta
    baderbouta
    7,804 Points

    Where are the project files for this video?

    Posted October 9, 2018 6:25pm by baderbouta
    baderbouta
    7,804 Points
    • JavaScript
    • Object-Oriented JavaScript
    • Getters and Setters
    • Object Interaction

    1 Answer

  • Nour El-din El-helw
    Nour El-din El-helw
    8,241 Points

    I need someone to review my solution to creating an owner for the pet.

    Posted October 7, 2018 7:07pm by Nour El-din El-helw
    Nour El-din El-helw
    8,241 Points
    • JavaScript
    • Object-Oriented JavaScript
    • Getters and Setters
    • Object Interaction

    1 Answer

  • yoav green
    yoav green
    8,611 Points

    how come ernie.owner in now an object?

    Posted July 24, 2018 11:39am by yoav green
    yoav green
    8,611 Points
    • JavaScript
    • Object-Oriented JavaScript
    • Getters and Setters
    • Object Interaction

    2 Answers

  • Rachel Heneault
    Rachel Heneault
    12,401 Points

    Uses for Object oriented programming with JavaScript

    Posted May 22, 2018 8:41am by Rachel Heneault
    Rachel Heneault
    12,401 Points
    • JavaScript
    • Object-Oriented JavaScript
    • Getters and Setters
    • Object Interaction

    1 Answer

  • Samuel Cleophas
    Samuel Cleophas
    12,348 Points

    Why does the setter 'method' not take in arguments?

    Posted April 30, 2018 9:50pm by Samuel Cleophas
    Samuel Cleophas
    12,348 Points
    • JavaScript
    • Object-Oriented JavaScript
    • Getters and Setters
    • Object Interaction

    3 Answers

Posting to the forum is only allowed for members with active accounts.
Please sign in or sign up to post.

    Treehouse

  • About
  • Blog
  • Careers
  • Community
  • Stories
  • Shop
  • Contact
  • Gift Card

See Full Catalogue

Techdegree

  • Front End Web Development
  • Full Stack JavaScript
  • Python Development
  • Data Analysis
  • UX Design

Tracks

  • Learn to Code for Beginners
  • Beginning Python
  • Beginning SQL
  • Beginning Java
  • ...see more

Courses

  • JavaScript Basics
  • Intro to HTML & CSS
  • Python Basics
  • CSS Layout
  • ...see more

Explore

  • Plans
  • Affiliates
  • Perks
  • Free Treehouse Near Me
  • Treehouse for Libraries
  • Treehouse for Businesses
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
  • Instagram
Terms & Conditions | Privacy

© 2025 Treehouse Island, Inc.