Its 'invisble' to the app

I corrected my typo, set the getter and setter to temperature. i left my conversion in the setter. my problem is that the ‘program’ does not see anything, but if i console.log it, i get a result. if i can get it to just see it, i can fix the math with no problem

Your code so far

// Only change code below this line

class Thermostat {
constructor(temperature) {
  this._temp = temperature;
get temperature(){
  return this._temp;
set temperature (newtemp){
    this._temp = (5/9) * (newtemp -32);

// Only change code above this line

const thermos = new Thermostat(76); // Setting in Fahrenheit scale
let temp = thermos.temperature; // 24.44 in Celsius
thermos.temperature = 26;
temp = thermos.temperature; // 26 in Celsius

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:80.0) Gecko/20100101 Firefox/80.0.

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

Link to the challenge:

Very uninformative error from FCC :unamused: , but looks like solution is that constructor must have the same logic as setter.

I figured it out. There was a typo, and I had my formula in the wrong place

  • V