Updated linter to work with restructure
This commit is contained in:
@ -7,9 +7,9 @@ Use `Array.reduce()` and the `lcm` formula (uses recursion) to calculate the low
|
||||
```js
|
||||
const arrayLcm = arr => {
|
||||
const gcd = (x, y) => !y ? x : gcd(y, x % y);
|
||||
const lcm = (x, y) => (x*y)/gcd(x, y);
|
||||
return arr.reduce((a,b) => lcm(a,b));
|
||||
}
|
||||
const lcm = (x, y) => (x * y) / gcd(x, y);
|
||||
return arr.reduce((a, b) => lcm(a, b));
|
||||
};
|
||||
```
|
||||
|
||||
```js
|
||||
|
||||
Reference in New Issue
Block a user