Use getters and setters to Control Access to an Object - No code but solved

Use getters and setters to Control Access to an Object - No code but solved
0

#1

Tell us what’s happening:

I don’t know how, but without writing much of the code, the problem was passed by FCC.
Why is it happenning so?

Your code so far


function makeClass() {
  "use strict";
  /* Alter code below this line */
  class Thermostat {
    constructor (){
      
    }
  }
  /* 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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.84 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

Sounds like a new bug.