Advertisement
CLooker

euclid's algorithm

Nov 14th, 2018
431
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const gcd = (a, b) =>
  2.   b === 0
  3.     ? a
  4.     : gcd(b, (a % b));
  5.  
  6. console.log(gcd(206, 40));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement