Travis build: 2161

This commit is contained in:
30secondsofcode
2018-06-18 18:26:52 +00:00
parent 5d79b0a165
commit 3197d6ddce
13 changed files with 40 additions and 31 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));
};
```