Migrate celsius/fahrenheit conversions
This commit is contained in:
16
snippets/celsiusToFahrenheit.md
Normal file
16
snippets/celsiusToFahrenheit.md
Normal file
@ -0,0 +1,16 @@
|
||||
---
|
||||
title: celsiusToFahrenheit
|
||||
tags: math,beginner
|
||||
---
|
||||
|
||||
Converts Celsius to Fahrenheit.
|
||||
|
||||
Follows the conversion formula `F = 1.8C + 32`.
|
||||
|
||||
```js
|
||||
const celsiusToFahrenheit = degrees => 1.8 * degrees + 32;
|
||||
```
|
||||
|
||||
```js
|
||||
celsiusToFahrenheit(33) // 91.4
|
||||
```
|
||||
Reference in New Issue
Block a user