Function to return the LCM of two numbers
function __gcd ( a , b ) { if ( b == 0 ) return a ; return __gcd ( b , a % b ) ; } function lcm ( x , y ) { var temp = ( x * y ) / __gcd ( x , y ) ; return temp ; }