prime-factors-lcm-hcf
v1.0.3
Published
Returns the prime factor decomposition in an array when given a single integer input. When given two integer inputs, it returns an array containing the highest common factor and the lowest common mutliple.
Downloads
3
Readme
Returns the prime factor decomposition in an array when given a single integer input. When given two integer inputs, it returns an array containing the highest common factor and the lowest common mutliple.
console.log(primeFactors(24)); -> [2, 2, 2, 3] console.log(primeFactors(12, 18)); -> [6, 36]