Task
In this challenge, you were provided with a variable that stored the temperature in degrees Fahrenheit and you were asked to convert it to degrees Celsius.
Solution
The formula used for converting temperatures from degrees Fahrenheit to Celsius is:
(fahrenheit - 32) * 5 / 9
All you had to do was rewrite celsius
and assign to it the conversion formula above.
var celsius = (fahrenheit - 32) * 5 / 9;
You can find the complete solution below:
You were required to write the code given on line 3.
Create a free account to access the full course.
Continue your learning journey with a 14-day free trial.
By signing up, you agree to Educative's Terms of Service and Privacy Policy