Add isBeforeDate, isAfterDate, isSameDate
This commit is contained in:
@ -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));
|
||||
};
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user