Here’s my code :
class Thermostat{
constructor(Fahrenheit){
this._Fahrenheit = Fahrenheit
}
get temperature(){
return 5/9 * (this._Fahrenheit - 32) + " C"
}
set temperature(celsius){
this._Fahrenheit = celsius * 9.0 / 5 + 32
}
}
const thermos = new Thermostat(76); // setting in Fahrenheit scale
let temp = thermos.temperature; // 24.44 in C
console.log(temp)thermos.temperature = 26;
temp = thermos.temperature; // 26 in C
console.log(temp)
Please, can anyone help me why test doesn’t passed with this exception :
Thermostat should be able to be instantiated.