I'm translating an encryption function from PHP to JS.
PHP: (Both $y and $z are ASCII characters, so $x is inherently an ASCII oddity.)
$x = ($y ^ $z);
Doing the same in JS results in $x = 0.
I tried:
$x = String.fromCharCode(($y).charCodeAt(0).toString(2) ^ ($z).charCodeAt(0).toString(2));
But it gets to a different result.