question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ambiguous Challenge Instructions

See original GitHub issue

Challenge Make Object Properties Private has an issue.

Please describe how to reproduce this issue, and include links to screenshots if possible.

Over the past couple days I’ve noticed a GH issue (#12385) and a few questions in the Javascript chat room about this challenge, all of which have all had to do with confusion about the purpose of the getGear and setGear functions. The challenge instructions explain private variables and private methods well, but doesn’t explain the purpose of getters and setters.

I think adding a simple explanation of getters and setters without going too deep into encapsulation would benefit campers greatly. The new instructions would include something along these lines:

Getter functions such as getSpeed() are meant to simply return (get) the value of an object’s private variable to the user without the user directly accessing the private variable.

Setter functions such as accelerate(change) are meant to modify (set) the value of an object’s private variable based on the value passed into the setter function. This change could involve calculations, or even overwriting the previous value completely.

If people have other opinions on the current instructions or proposed changes, please share 😄

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
Bounceycommented, Jan 7, 2017

Since the challenge asks you to define getGear and setGear I think the explanation would be welcome. Yes it is a paradigm, but it is a pretty standard one.

I’m 👍 for a change to the instructions

1reaction
raisedadeadcommented, Jan 9, 2017

@robbawebba sure thing, follow the issues on the https://github.com/FreeCodeCamp/CurriculumExpansion repo and join the conversation in the Contributors Chat room.

Read more comments on GitHub >

github_iconTop Results From Across the Web

7 Tips To Identify and Manage Ambiguity in the Workplace
Ambiguity at work can make your job more challenging, but you can often use certain techniques and strategies to overcome many ambiguous ......
Read more >
How to Deal With Ambiguity: Guidelines and Resources
Be realistic in expectations and deadlines. Build in means to make changes to plans as necessary. See ambiguity as means to more creativity...
Read more >
3 Steps Successful People Take To Overcome Ambiguity At ...
Great professionals know how to manage uncertainty. First, understand the information you have in front of you. Second, ask questions to gather ...
Read more >
7 Ways to Help Your Team Deal with Ambiguity at Work
7 Ways to Help Your Team Deal With Ambiguity at Work · Understand your own tolerance and reactions · Be crystal clear on...
Read more >
"Tell Me About A Time You Had to Deal With Ambiguity ...
2 brilliant example answers to help you! - A FULL MOCK INTERVIEW to teach you how to pass your job interview! (WATCH THE...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found