es-next-tools
Version:
A comprehensive utility library for JavaScript and TypeScript that provides a wide range of functions for common programming tasks, including mathematical operations, date manipulations, array and object handling, string utilities, and more.
10 lines (9 loc) • 318 B
TypeScript
/**
* Calculates the least common multiple (LCM) of two numbers.
* @param {number} a - The first number.
* @param {number} b - The second number.
* @returns {number} The least common multiple of a and b.
* @example
* const result = lcm(4, 6); // 12
*/
export declare function lcm(a: number, b: number): number;