implemented xor using javascript
xor: working on index of coincidence