Random number generator, in js.