title: JavaScript - Bitwise XOR on strings?
body: <p>I'm translating an encryption function from PHP to JS.</p>
  
  <p>PHP: (Both $y and $z are ASCII characters, so $x is inherently an ASCII oddity.)</p>
  
  <pre><code> $x = ($y ^ $z);
  </code></pre>
  
  <p>Doing the same in JS results in $x = 0. </p>
  
  <p>I tried:</p>
  
  <pre><code> $x = String.fromCharCode(($y).charCodeAt(0).toString(2) ^ ($z).charCodeAt(0).toString(2));
  </code></pre>
  
  <p>But it gets to a different result.</p>