Really naïve implementation of a perceptron in js (don't expect it works in all cases)