JavaScript implementation of XOR and Neurons