To test it, set trainMode? to 0 and change the A and B sliders. The answer should be at least close to A + B. To let it keep training, set trainMode? to 1 and click the green flag again. It works, sort of. Most of the time it gets pretty close.
The learning method I used to train this is one I came up with. Basically, I select about one fifth of all the weights and adjusts just that weight up and down, running the neural network with the same inputs to see if adjusting the weight made the error go up or down. Then it adjusts the weight from the position it was in before it started "messing" with the weight, and adjusts it in the direction that seemed to reduce the error.