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

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

#1

**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/


#2

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.


#3

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!


#4

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.


#5

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.


#6

FCC has a HUGE support team of volunteer contributors. You have the power to create GitHub issues and also work on the solutions for them and request for the solutions to be implemented.


#7

Not everyone has that power @randelldawson. Not everyone has a GitHub account @randelldawson.
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?


#8

Anyone can create a github account for free and help fix the curriculum. You can create a gitbhub account and then work on whatever needs to be fixed that you feel you have the knowledge to fix. That is what I mean by you have the power.


#9

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.


#10

It looks like both of you (@ArielLeslie and @randelldawson ) 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.


#11

@procode200 Let me rephrase my statement from my previous post.

Anyone can create a github account for free and help fix the curriculum if they have access to github. If you have access to github, you can create a gitbhub account and then work on whatever needs to be fixed that you feel you have the knowledge to fix. That is what I mean by you have the power.

Free Code Camp is a free resource for those networks who allow it. If your network blocks access to freecodecamp.org, would you say Free Code Camp is not thinking of everyone else who does not have access to it?

I sure hope the answer to that question is no, because I would hope you realize Free Code Camp can not dictate what your network allows and blocks. If you have a problem with your network blocking access to a particular site, take the issue up with your network. You said we (@ArielLeslie and I) were not thinking of others, but it sounds like the truth is your network is the one not thinking of others.