-
Notifications
You must be signed in to change notification settings - Fork 0
lcm
Subhajit Sahu edited this page Aug 9, 2022
·
2 revisions
Find the least common multiple of numbers.
function lcm(...xs)
// xs: a list of numbers
const xnumber = require('extra-number');
xnumber.lcm(2, 3);
// → 6
xnumber.lcm(2, 3, 4);
// → 12
xnumber.lcm(2, 3, 4, 5);
// → 60