Skip to main content

Notice: Workspaces are undergoing maintenance and are temporarily unavailable.

🚀 In our NEW AI Bootcamp you'll build a working app in 28 days, no experience required. Free to all subscription levels.

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

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

  • Treehouse Logo
    • For Individuals
    • For Businesses
    • For Schools
    • For Libraries
    • For Military
    • All Courses
    • Tracks
    • AI Bootcamp
    • College Credit
    • Techdegree Bootcamps
    • Front End Development
    • Full Stack JavaScript
    • Code Adventures
    • Discord
    • Forum
    • Success Stories
    • Treehouse Links
    • 100 Days of Code
    • Explore
    • Career Toolbox
    • Free Treehouse Near Me
    • Affiliates
    • Blog
    • Support
    • About
    • Learn
    • Beginner's Guide to Coding
    • Data Analysis with SQL & Python
    • Front-End Web Development
    • Python Programming Basics
    • Techdegree Bootcamp Overview
    • UX Design Fundamentals
    • AI Tools for Beginners
  • For Individuals For Businesses For Schools For Libraries For Military
  • All Courses Tracks AI Bootcamp College Credit
  • Techdegree Bootcamps Front End Web Development Full Stack JavaScript
  • Code Adventures Discord Forum Success Stories Treehouse Links 100 Days of Code
  • Explore Career Toolbox Free Treehouse Near Me Affiliates Blog Support About
    Learn Beginner's Guide to Coding Data Analysis with SQL & Python Front-End Web Development Python Programming Basics Techdegree Bootcamp Overview UX Design Fundamentals AI Tools for Beginners
  • Sign In
  • Free Trial
Instagram Twitter Facebook YouTube LinkedIn
Loading banner... Start your free trial at Treehouse
    • Newest
      • Newest
      • Active
      • Unanswered
      • Featured
    • All Topics
      • All Topics
      • • General Discussion
      • • AI
      • • 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
      • • Vibe Coding
  • 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,136 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,136 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,471 Points

    Uses for Object oriented programming with JavaScript

    Posted May 22, 2018 8:41am by Rachel Heneault
    Rachel Heneault
    12,471 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.

Techdegree

  • Front End Web Development
  • Full Stack JavaScript
SEE ALL

Tracks

  • Learn to Code for Beginners
  • Beginning Python
  • Beginning SQL
  • Beginning Java
SEE ALL

Courses

  • JavaScript Basics
  • Intro to HTML & CSS
  • Python Basics
  • CSS Layout
SEE ALL

About Us

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

Explore

  • Plans
  • Affiliates
  • Perks
  • Shop
  • Free Treehouse Near Me
  • Treehouse for Libraries
  • Treehouse for Businesses

Treehouse is an online technology education platform founded in 2011. Treehouse offers more than 700 self-paced, video-based courses in web development, programming, data analysis, design, and AI, plus two project-based bootcamp programs in Front End Web Development and Full Stack JavaScript. Individual Treehouse plans start at $25 per month and include a 7-day free trial. Treehouse serves individual learners, businesses, schools, and public libraries. Cardholders at participating U.S. public libraries can use Treehouse for free. Select Treehouse courses, offered with University Pathways International, are recommended for college credit by ACE and NCCRS. Treehouse learners earn digital certificates for completed Tracks.

Terms & Conditions · Privacy · © 2026 Treehouse Island, Inc.
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
  • Instagram
  • Discord