Ask HN: Best Way to Get Started with ML Using JavaScript?
Andrej Karpathy's blog has examples of JavaScript implementation of Neural Networks. https://github.com/karpathy/convnetjs
Have you try Tensorflow.js to run ML on the browser. I think is a good place to start