Turning Javascript into a probabilistic programming language