Who the hell would use the relatively library less javascript to do analysis? Sorry, R, Matlab, Python, Syntax, Fortran have actual libraries for this stuff, JS, no.
Yeah, I find it kind of funny when people compare a general purpose programming language with a statistical software. In R you have libraries for things like Apprximate Bayesian Computation, parametric and non-parametric statistics, and even neural networks. Sure, you could achieve the same with a general purpose PL, but you would have to implement everything from scratch.
Several general purpose languages (Fortran, Python, and Matlab ) have very nice statistical programming packages at the current date.