Files
30-seconds-of-code/javascript/snippets/fahrenheit-to-celsius.md
2023-05-01 22:35:56 +03:00

21 lines
342 B
Markdown

---
title: Fahrenheit to Celsius
type: snippet
tags: [math]
unlisted: true
cover: last-light
dateModified: 2021-01-04T13:04:15+02:00
---
Converts Fahrenheit to Celsius.
- Follow the conversion formula `C = (F - 32) * 5 / 9`.
```js
const fahrenheitToCelsius = degrees => (degrees - 32) * 5 / 9;
```
```js
fahrenheitToCelsius(32); // 0
```