Ive been working this challenge for the better part of an hour, its time i ask for help or how people approached the solution…
@camperextraordinaire
What have you tried? What isn’t working as you expect?
Well ive been very confused for a long time now, but after taking a break i tried again with this code
How can i get the test case Instantiated to pass?
sorry im back, i think this is what i had in the screenshot
/* Alter code below this line */
class Thermostat{
constructor(fahrenheit){
this._fahrenheit = fahrenheit;
}
get temperature(){
console.log("fahrenheit");
this._fahrenheit = fahrenheit * 9.0 / 5 + 32;
}
set temperature(celsius){
//this._fahrenheit = console.log("trying to get celsius");
this._fahrenheit = 5/9 * (celsius-32)
}
}
/* Alter code above this line */
const thermos = new Thermostat(32); // setting in Fahrenheit scale
//let temp = thermos.temperature; // 24.44 in C
//thermos.temperature = 26;
//temp = thermos.temperature; // 26 in C
console.log(thermos);