Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

JavaScript Code to Perform GCD using Recursion

function gcd(a, b) {
  if (b == 0)
    return a;
  else
    return gcd(b, (a % b));
}
Source by www.freecodecamp.org #
 
PREVIOUS NEXT
Tagged: #JavaScript #Code #Perform #GCD #Recursion
ADD COMMENT
Topic
Name
4+6 =