Files
30-seconds-of-code/snippets/fahrenheitToCelsius.md
30secondsofcode f40bb25ad0 Travis build: 1878
2020-04-16 08:54:37 +00:00

258 B

title, tags
title tags
fahrenheitToCelsius math,beginner

Converts Fahrenheit to Celsius.

Follows the conversion formula C = (F - 32) * 5/9.


const fahrenheitToCelsius = degrees => (degrees - 32) * 5 / 9;
fahrenheitToCelsius(32); // 0