Euclid's algorithm

Just for fun:

var _gcd = function(a, b) { return ( b == 0 ) ? a : _gcd( b, a%b ); }

Featured