Program to find GCD or HCF of two numbers | Recursive function to return gcd of a and b ; Driver code
function gcd ( a , b ) { if ( b == 0 ) { return a ; } return gcd ( b , a % b ) ; } let a = 98 ; let b = 56 ; document . write ( ` ${ a } ${ b } ${ gcd ( a , b ) } ` ) ;