Archived
This commit is contained in:
13
snippets_archive/celsiusToFahrenheit.md
Normal file
13
snippets_archive/celsiusToFahrenheit.md
Normal file
@ -0,0 +1,13 @@
|
||||
### celsiusToFahrenheit
|
||||
|
||||
Celsius to Fahrenheit temperature conversion.
|
||||
|
||||
Follows the conversion formula `F = 1.8C + 32`.
|
||||
|
||||
```js
|
||||
const celsiusToFahrenheit = degrees => 1.8 * degrees + 32;
|
||||
```
|
||||
|
||||
```js
|
||||
celsiusToFahrenheit(33) // 91.4
|
||||
```
|
||||
13
snippets_archive/fahrenheitToCelsius.md
Normal file
13
snippets_archive/fahrenheitToCelsius.md
Normal file
@ -0,0 +1,13 @@
|
||||
### fahrenheitToCelsius
|
||||
|
||||
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
|
||||
```
|
||||
Reference in New Issue
Block a user