Check a number is odd or even without modulus operator | Returns true if n is even , else odd ; Driver code
function isEven ( n ) { let isEven = true ; for ( let i = 1 ; i <= n ; i ++ ) isEven = ! isEven ; return isEven ; } let n = 101 ; if ( isEven ( n ) ) document . write ( " " ) ; else document . write ( " " ) ;