写一个方法找出两个数的最大公约数

19 阅读1分钟

"```javascript function findGCD(a, b) { if (b === 0) { return a; } return findGCD(b, a % b); } const num1 = 48; const num2 = 18; const gcd = findGCD(num1, num2); console.log(The GCD of ${num1} and ${num2} is ${gcd});