Compute the least common multiple using Euclid's algorithm.
var lcm = require('lcm');
var n = lcm(21, 6);
console.log(n);
42
var lcm = require('lcm')
Return the least common multiple of the integers a
and b
using Euclid's
algorithm.
With npm do:
npm install lcm
MIT