Detect if two integers have opposite signs | Function to detect signs ; Driver Code
function oppositeSigns ( x , y ) { return ( ( x ^ y ) < 0 ) ; } let x = 100 , y = - 100 ; if ( oppositeSigns ( x , y ) == true ) document . write ( " " ) ; else document . write ( " " ) ;