Advertisement
kstoyanov

02. Greatest Common Divisor – GCD v1

Sep 16th, 2020
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function solve(a, b) {
  2.   if (b) {
  3.     return solve(b, a % b);
  4.   }
  5.   return Math.abs(a);
  6. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement