Ironically, looking dennybritz's comment, JS is particularly ill-suited for this, as, as far as I'm aware, there are no libraries for working on the GPU, which is tremendously useful for working with machine learning algorithms which usually are crunching lots of data.
However, I don't know much about karpathy's specific implementation and experiments, so there might be a reason he choose JS. I'm thinking its more likely to make visualizations easier rather than any computational reason though, so you might be stuck in a niche there.