Use getters and setters to Control Access to an Object, Maximum call stack size exceeded

Tell us what’s happening:
Maximum call stack size exceeded

Your code so far

function makeClass() {
  "use strict";
  /* Alter code below this line */
  class Thermostat{
    constructor(value){
      this.fahhrenheit=value;
      this.temperature=(5/9*(this.fahhrenheit-32))
    }
    get temperature(){
      return this.temperature;
    }
    set temperature(value){
      this.temperature=value;
    }
  }
  /* 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
```js

function makeClass() {
  "use strict";
  /* Alter code below this line */
  class Thermostat{
    constructor(value){
      this.fahhrenheit=value;
      this.temperature=(5/9*(this.fahhrenheit-32))
    }
    get temperature(){
      return this.temperature;
    }
    set temperature(value){
      this.temperature=value;
    }
  }
  /* 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/75.0.3770.142 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/

It is because your public variable has the same as your internal variable. Notice how, in the instruction example, the code deals with an author but the getter and setter deal with a writer.

Your code is basically calling itself again, everytime it runs the getting or setting code.

I would create a new variable (with a different name than ‘temperature’) in the class, using let. Then in your getter and setter either return that variable, or set it’s value to value.