Files
30-seconds-of-code/snippets_archive/fahrenheitToCelsius.md
Angelos Chalaris 611729214a Snippet format update
To match the starter (for the migration)
2019-08-13 10:29:12 +03:00

16 lines
268 B
Markdown

---
title: fahrenheitToCelsius
tags: math,beginner
---
Fahrenheit to Celsius temperature conversion.
Follows the conversion formula `C = (F - 32) * 5/9`.
```js
const fahrenheitToCelsius = degrees => (degrees - 32) * 5/9;
```
```js
fahrenheitToCelsius(32); // 0
```