BUG: Use getters and setters to Control Access to an Object

**Hello! I think I found a bug in this exercise. As written in the title, this exercise is about using getters and setters. However, it seems that I passed this test without using getters nor setters. Of course I’m happy I passed it, but writing a setter and a getter wasn’t mandatory. Is this exercise supposed to be this way? **

Your code so far


function makeClass() {
  "use strict";
  /* Alter code below this line */
class Thermostat {
constructor(temperature){
  this.fahrenheit = temperature;
}

}


  /* Alter code above this line */
  return Thermostat;
}
const Thermostat = makeClass();
const thermos = new Thermostat(76); // setting in Fahrenheit scale
let temp = thermos.temperature; // 24.44 in C
thermos.temperature = 26;
temp = thermos.temperature; // 26 in C

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/es6/use-getters-and-setters-to-control-access-to-an-object/

Bugs should always be reported as GitHub Issues. Whenever reporting a bug, please check first that there isn’t already an issue for it and provide as much detail as possible.

1 Like

Bugs can also be reported via team@freecodecamp.org, the fcc gitter, messaging Quincy Larson via this forum, fcc twitter, fcc facebook group and page, etc, etc ,etc.
There are so many ways!

All of those things are just hoping that someone else creates a GitHub Issue. The FCC email account already gets thousands of emails a day and is probably the least helpful way to report a bug.

1 Like

That is because FFC needs to get a support team instead of just all one person (@QuincyLarson). If it were a support team it would go thru much more smoothly and be much less stressful for everyone.

Not everyone has that power @camperextraordinaire. Not everyone has a GitHub account @camperextraordinaire.
Let’s also try to think of others here.

So the question is, why did you say we have the power when not everyone does?

Anyone can do it easily and for free. If they choose not to, that’s fine. No user of FCC is required to contribute. If they want to report a bug, there is a way to do that via a free and accessible tool.

It looks like both of you (@ArielLeslie and @camperextraordinaire ) are not thinking of others!
Not everyone has access to GitHub as some networks block it.
Some people have accounts that they lost the password to.
Some people have tried to make a GitHub account and they have been unsuccessful.
As most users can create an account, not everyone can.
You should always try to think of others and what situations they are in.