A few things to look at when implementing any ML related stuff:
- Availability of Basic Libraries:
It's very important to have a few core libraries like scipy/numpy/scikit-learn available when starting. The vector/matrix based calculations will consume lot of time, if you start from scratch because there are hardly any libraries available in JS. But this applies only if we use ML for some application oriented use case. Ignore this if you want to just work in machine learning for research purpose.
- Peculiar features of JS:
When working in JS, we can think of putting features like async etc. to work. I'm not quite sure about any specific ML algorithms that would make use of these. But you can look into those.
- Thinking in JS:
I found it a little hard to think in JS when implementing a few algorithms like tf-idf. Basically the non-blocking way of coding was what I felt a bit different from what we do in Python.
- Community support:
There are hardly any programmers implementing ML in JS. You might not get enough support, which is essential when you do it from scratch. But there are a bunch of small libraries, unfinished projects which basically were trials, but I see no activity there. And there are lot of assumptions those developers made when compared with the original algorithms. So, I wouldn't suggest you to start working on top of them.
Anyways, I'm not completely sure what you do use it for. These are my experiences. Hope it helps you decide!