XOR of two Binary Strings | Function to find the XOR of the two Binary Strings ; Loop to iterate over the Binary Strings ; If the Character matches ; Driver Code
function xoring ( a , b , n ) { let ans = " " ; for ( let i = 0 ; i < n ; i ++ ) { if ( a [ i ] == b [ i ] ) ans += " " ; else ans += " " ; } return ans ; } let a = " " ; let b = " " ; let n = a . length ; let c = xoring ( a , b , n ) ; document . write ( c ) ;