Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
After lolucky's suggestion solution in Clear category for The Greatest Common Divisor by suic
// See: https://js.checkio.org/mission/the-greatest-common-divisor/publications/suic/js-node/first/share/e54ee00f797e5cd1ef2bc173f82f10b8/#comment-5792
const gcd = (a: number, b: number): number => b ? gcd(b, a % b) : a
function greatestCommonDivisor(...args: number[]): number {
return args.reduce(gcd)
}
Dec. 4, 2020
Comments: