Travis build: 559

This commit is contained in:
30secondsofcode
2018-09-29 13:47:39 +00:00
parent 096b937691
commit 1580116dd7
20 changed files with 194 additions and 20 deletions

View File

@ -8,7 +8,7 @@ The GCD formula uses recursion.
```js
const lcm = (...arr) => {
const gcd = (x, y) => (!y ? x : gcd(y, x % y));
const _lcm = (x, y) => x * y / gcd(x, y);
const _lcm = (x, y) => (x * y) / gcd(x, y);
return [...arr].reduce((a, b) => _lcm(a, b));
};
```