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

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

New No-Code Track! 🚀start learning today!

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

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

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

  • 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
    • 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
  • 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
    • Showing results for:
    • JavaScript
    • Object-Oriented JavaScript
    • Getters and Setters
    • Object Interaction
    • Close
  • 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 on Sep 18, 2022 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 on Jan 26, 2022 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 on Dec 17, 2021 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 on Oct 15, 2021 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 on Sep 7, 2021 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 on May 6, 2021 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 on Apr 22, 2021 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 on Nov 11, 2020 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 on Sep 13, 2020 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 on Sep 10, 2020 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 on May 15, 2020 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 on Apr 22, 2020 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 on Mar 28, 2020 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 on May 8, 2019 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 on Mar 11, 2019 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 on Nov 25, 2018 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 on Nov 23, 2018 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 on Oct 9, 2018 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 on Oct 7, 2018 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 on Jul 24, 2018 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 on May 22, 2018 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 on Apr 30, 2018 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.