Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

gcd

import { gcd } from "https://raw.githubusercontent.com/JOTSR/Denum/master/mod.ts";

It takes two or more numbers and returns the greatest common divisor of all of them

function gcd<T extends number | bigint>(...n: T[]): T;
§
gcd<T extends number | bigint>(...n: T[]): T
[src]

§Type Parameters

§
T extends number | bigint
[src]

§Parameters

§
...n: T[] optional
[src]
  • Numbers to calculate the greatest common divisor for

§Return Type

§

The greatest common divisor of the given numbers.