✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
class Temperature {#celsius;
constructor(c) { this.#celsius = c; }
get fahrenheit() {
return this.#celsius \* 9/5 + 32;
}
set fahrenheit(f) {
this.#celsius = (f - 32) \* 5/9;
}
}
const t = new Temperature(0);
console.log(t.fahrenheit);