Function to compute the final results after the operations
function computeResults ( arr , effect ) { for ( let i = 0 ; i < arr . length ; i ++ ) { arr [ i ] = arr [ i ] ^ effect ; document . write ( arr [ i ] + " " ) ; } }