Subtract two numbers without using arithmetic operators | javascript Program to subtract two Number without using arithmetic operator Recursive implementation . ; Driver program
function subtract ( x , y ) { if ( y == 0 ) return x ; return subtract ( x ^ y , ( ~ x & y ) << 1 ) ; } var x = 29 , y = 13 ; document . write ( " " + subtract ( x , y ) ) ;