Beginner
Temperature converters as arrows
Write two arrow functions with concise bodies (no braces, no return keyword):
toCelsius(f) returns (f - 32) * 5 / 9, and toFahrenheit(c) returns c * 9 / 5 + 32.
For example, toCelsius(212) is 100 and toFahrenheit(100) is 212.
What Check tests
toCelsius(212)is 100 andtoCelsius(32)is 0toFahrenheit(100)is 212 andtoFahrenheit(0)is 32- Both agree at -40 (the one temperature where the scales meet)
- Both are arrow functions
Stuck? One hint at a time
The solution unlocks after your first Check. Try first: that is where the learning happens.
Runs in your browser. Your code is saved here.
Press Run to see the page.
Console
Nothing printed yet.