Update formatting

This commit is contained in:
Isabelle Viktoria Maciohsek
2022-01-30 18:34:30 +02:00
parent 1c0190b1ad
commit ae1828e42f
6 changed files with 8 additions and 8 deletions

View File

@ -10,7 +10,7 @@ Returns the human-readable format of the given number of milliseconds.
- Divide `ms` with the appropriate values to obtain the appropriate values for `day`, `hour`, `minute`, `second` and `millisecond`.
- Use `Object.entries()` with `Array.prototype.filter()` to keep only non-zero values.
- Use `Array.prototype.map()` to create the string for each value, pluralizing appropriately.
- Use `String.prototype.join(', ')` to combine the values into a string.
- Use `String.prototype.join()` to combine the values into a string.
```js
const formatDuration = ms => {