Skip to content

Function: lcm() ​

ts
function lcm(a, b): number;

Least common multiple. 最小公倍数。

Parameters ​

ParameterTypeDescription
anumberFirst integer / 第一个整数
bnumberSecond integer / 第二个整数

Returns ​

number

LCM / 最小公倍数

Example ​

ts
lcm(4, 6) // => 12

Since ​

1.0.0

Released under the MIT License.