求两个数a、b的最大公约数

//求两个数a、b的最大公约数
function gcd(a,b){
    return b===0?a:gcd(b,a%b)
}

  

原文地址:https://www.cnblogs.com/caoke/p/10512079.html