Use getters & setters to control access to an object

Hi
can anyone help with this code, i’ve tried various versions but i’m not getting any response from test output.
my code:

function makeClass() {
  "use strict";
  /* Alter code below this line */
class Thermostat {
  constructor(temperature) {
    this._temperature = temperature;
  } 
  get Celsius(){
    return this._temperature;
  }
  set Celsius(c = 5/9 * (F - 32), F = C * 9.0 / 5 + 32){
    this._temperature = (c = 5/9 * (F - 32), F = C * 9.0/ 5 +32);
  }
}
  /* Alter code above this line */
  return Thermostat;
}

Thanks for any response

Thanks Randell,
Got it.

There is a bug on this problem.

This solution passes but does not meet the requirements in the instructions:

Now create getter and setter in the class, to obtain the temperature in Celsius scale.
3 Likes