Syntax

TypeScript
import { lcm } from '@opentf/std';

lcm(a: number, b: number): number;

Parameters

NameTypeDescription
anumberThe first integer.
bnumberThe second integer.

Returns

The least common multiple.

Examples

TypeScript
lcm(4, 6) //=> 12
lcm(21, 6) //=> 42
lcm(0, 5) //=> 0
Last updated on
Edit this page