Largest of two distinct numbers without using any conditional statements or operators | Function to find the largest number ; Driver code
function largestNum ( a , b ) { return a * ( parseInt ( a / b ) > 0 ? 1 : 0 ) + b * ( parseInt ( b / a ) > 0 ? 1 : 0 ) ; } var a = 22 , b = 1231 ; document . write ( largestNum ( a , b ) ) ;