Files
30-seconds-of-code/snippets/kphToMph.md
2018-10-12 21:49:43 +02:00

15 lines
253 B
Markdown

### kphToMph
Convert kilometers/hour to miles/hour.
Multiply the constant of proportionality with the argument.
```js
const kphToMph = (kph) => 0.621371192 * kph;
```
```js
kphToMph(10); //16.09344000614692
kphToMph(345.4); //138.24264965280207
```