Have to do this to finish

i have done this over quite a few times. Someone was nice enough to point out one error. I fixed that - nope. i looked in my reference books, poked around youtube. everything matches what i have done ( except for the conversion at the beginning.

it does not see the indication(whatever that word is) , the getter or the setter.

Your code so far

// Only change code below this line
class Thermostat {
 constuctor(temp)  {
     this._temp = 5/9 * (temp - 32);
  get konvertF() {
    return this._temp;
  set konvertF(newCelci) {
    this._temp = newCelci;
// 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:

Getter and Setter name should be temperature because it is mentioned in the challenge. You’ve named those to konvertF. Also the spelling constructor keyword is incorrect in your code.

i got it! I had the equation in the wrong place!!!

1 Like