diff --git a/GCD/gcd.js b/GCD/gcd.js new file mode 100644 index 0000000..c71394f --- /dev/null +++ b/GCD/gcd.js @@ -0,0 +1,3 @@ +const gcd = (a, b) => (a === b ? a : a > b ? gcd(a - b, b) : gcd(a, b - a)); + +console.log(`GCD of 15 and 20 is ${gcd(15, 20)}`); \ No newline at end of file