check-gcd
v1.0.1
Published
function that checks greatest common divisor between two numbers
Downloads
7
Readme
Greatest Common Divisor
Test this by calling:
gcd(12,45)
Function:
const gcd = (a, b) => {
if (b == 0) {
return a;
} else {
return gcd(b, a % b);
}
};