Check a number is odd or even without modulus operator | Returns true if n is even , else odd ; Return true if n / 2 does not result in a float value . ; Driver code
function isEven ( n ) { return ( parseInt ( n / 2 , 10 ) * 2 == n ) ; } let n = 101 ; isEven ( n ) ? document . write ( " " ) : document . write ( " " ) ;