✨ 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
    • Setters
    • Close
  • Samuel Kleos
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Samuel Kleos
    Front End Web Development Techdegree Student 13,728 Points

    What's the purpose of the underscore if you can just different words for getting and setting?

    Posted on Feb 13, 2023 by Samuel Kleos
    .a{fill-rule:evenodd;}techdegree
    Samuel Kleos
    Front End Web Development Techdegree Student 13,728 Points
    • JavaScript
    • Object-Oriented JavaScript
    • Getters and Setters
    • Setters

    2 Answers

  • Peter Huang
    Peter Huang
    5,427 Points

    To have a set, you always need to have " get " to return?

    Posted on Dec 11, 2022 by Peter Huang
    Peter Huang
    5,427 Points
    • JavaScript
    • Object-Oriented JavaScript
    • Getters and Setters
    • Setters

    1 Answer

  • Jamie Moore
    Jamie Moore
    3,997 Points

    Getters and Setters - use case examples?

    Posted on Jun 14, 2021 by Jamie Moore
    Jamie Moore
    3,997 Points
    • JavaScript
    • Object-Oriented JavaScript
    • Getters and Setters
    • Setters

    1 Answer

  • Quinton Shuman
    Quinton Shuman
    7,068 Points

    So I've watched the video like 8 times and I just don't see what the value "owner" is representing in set owner(OWNER) {

    Posted on Feb 20, 2021 by Quinton Shuman
    Quinton Shuman
    7,068 Points
    • JavaScript
    • Object-Oriented JavaScript
    • Getters and Setters
    • Setters

    4 Answers

  • Sam Bailey
    Sam Bailey
    8,425 Points

    Why does this.owner = owner not work?

    Posted on Oct 15, 2020 by Sam Bailey
    Sam Bailey
    8,425 Points
    • JavaScript
    • Object-Oriented JavaScript
    • Getters and Setters
    • Setters

    4 Answers

  • Alejandro Carvajal
    Alejandro Carvajal
    9,100 Points

    Why complicate OOJS?

    Posted on Oct 9, 2019 by Alejandro Carvajal
    Alejandro Carvajal
    9,100 Points
    • JavaScript
    • Object-Oriented JavaScript
    • Getters and Setters
    • Setters

    2 Answers

  • AJ Jhaveri
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    AJ Jhaveri
    Full Stack JavaScript Techdegree Student 512 Points

    String interpolation for setter video example not working.

    Posted on Sep 12, 2019 by AJ Jhaveri
    .a{fill-rule:evenodd;}techdegree
    AJ Jhaveri
    Full Stack JavaScript Techdegree Student 512 Points
    • JavaScript
    • Object-Oriented JavaScript
    • Getters and Setters
    • Setters

    3 Answers

  • Alexander D
    Alexander D
    8,685 Points

    Help to understand Setter

    Posted on Aug 6, 2019 by Alexander D
    Alexander D
    8,685 Points
    • JavaScript
    • Object-Oriented JavaScript
    • Getters and Setters
    • Setters

    1 Answer

  • Jack White
    Jack White
    4,893 Points

    Getters and setters

    Posted on Jun 22, 2019 by Jack White
    Jack White
    4,893 Points
    • JavaScript
    • Object-Oriented JavaScript
    • Getters and Setters
    • Setters

    1 Answer

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

    Does it matter what order you invoke the getter and setter methods? Does get always go before set?

    Posted on Mar 27, 2019 by Jesse Dispoto
    .a{fill-rule:evenodd;}techdegree seal-36
    Jesse Dispoto
    Front End Web Development Techdegree Graduate 14,538 Points
    • JavaScript
    • Object-Oriented JavaScript
    • Getters and Setters
    • Setters

    4 Answers

  • Maxim Melnic
    Maxim Melnic
    4,178 Points

    We can add return this.owner in set method?

    Posted on Jan 14, 2019 by Maxim Melnic
    Maxim Melnic
    4,178 Points
    • JavaScript
    • Object-Oriented JavaScript
    • Getters and Setters
    • Setters

    5 Answers

  • Andrew Lim
    Andrew Lim
    8,004 Points

    Why would you not put the _owner in the constructor?

    Posted on Jan 8, 2019 by Andrew Lim
    Andrew Lim
    8,004 Points
    • JavaScript
    • Object-Oriented JavaScript
    • Getters and Setters
    • Setters

    2 Answers

  • Andrew Rothbauer
    Andrew Rothbauer
    13,030 Points

    Getting SyntaxError: Unexpected identifier

    Posted on Dec 31, 2018 by Andrew Rothbauer
    Andrew Rothbauer
    13,030 Points
    • JavaScript
    • Object-Oriented JavaScript
    • Getters and Setters
    • Setters

    2 Answers

  • Christian van Lierop
    Christian van Lierop
    13,758 Points

    Confusion by naming conventions owner(owner)= owner...

    Posted on Oct 16, 2018 by Christian van Lierop
    Christian van Lierop
    13,758 Points
    • JavaScript
    • Object-Oriented JavaScript
    • Getters and Setters
    • Setters

    1 Answer

  • Justin Duncan
    Justin Duncan
    8,465 Points

    Why use the same name as the property?

    Posted on Sep 29, 2018 by Justin Duncan
    Justin Duncan
    8,465 Points
    • JavaScript
    • Object-Oriented JavaScript
    • Getters and Setters
    • Setters

    2 Answers

  • Jonathan Grieve
    MOD
    Jonathan Grieve
    Treehouse Moderator 91,254 Points

    No setter method for activity?

    Posted on Aug 30, 2018 by Jonathan Grieve
    Jonathan Grieve
    Treehouse Moderator 91,254 Points
    • JavaScript
    • Object-Oriented JavaScript
    • Getters and Setters
    • Setters

    1 Answer

  • Peter Retvari
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Peter Retvari
    Full Stack JavaScript Techdegree Student 8,392 Points

    Where exactly we use the owner parameter inside: set owner (owner)?

    Posted on Aug 21, 2018 by Peter Retvari
    .a{fill-rule:evenodd;}techdegree
    Peter Retvari
    Full Stack JavaScript Techdegree Student 8,392 Points
    • JavaScript
    • Object-Oriented JavaScript
    • Getters and Setters
    • Setters

    1 Answer

  • Matthew Russo
    Matthew Russo
    3,871 Points

    Why not use: console.log(ernie._owner); ?

    Posted on Jul 31, 2018 by Matthew Russo
    Matthew Russo
    3,871 Points
    • JavaScript
    • Object-Oriented JavaScript
    • Getters and Setters
    • Setters

    2 Answers

  • Christian Higgins
    Christian Higgins
    15,758 Points

    Getting "setter called: ${owner}" instead of "setter called: Ashley" in console

    Posted on Jun 5, 2018 by Christian Higgins
    Christian Higgins
    15,758 Points
    • JavaScript
    • Object-Oriented JavaScript
    • Getters and Setters
    • Setters

    2 Answers

  • Sarah Breidenbach
    Sarah Breidenbach
    4,490 Points

    With console.log('setter called: ${owner}'); what are the $ and curly bracket for?

    Posted on May 12, 2018 by Sarah Breidenbach
    Sarah Breidenbach
    4,490 Points
    • JavaScript
    • Object-Oriented JavaScript
    • Getters and Setters
    • Setters

    2 Answers

  • Chris Pulver
    Chris Pulver
    7,624 Points

    Why prepend a class property?

    Posted on Apr 28, 2018 by Chris Pulver
    Chris Pulver
    7,624 Points
    • JavaScript
    • Object-Oriented JavaScript
    • Getters and Setters
    • Setters

    2 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.