Yes it is possible. However, you need to write your own pseudo random number generator.
See, computers cannot generate random numbers. However, you can use an algorithm that creates a sequence of numbers that seems random.
This algorithm usually receives a seed, and each seed leads to a different sequence of random numbers generated by the algorithm.
The most common algorithm is a linear congruent pseudorandom number generator, as defined by D. Kh. Lemer and described by Donald E. Knut in the Art of Computer Programming, Volume 2: “Seven-Dimensional Algorithms”, Section 3.2.1.
See the following thread for more details: Predict Javascript's Math.random seed
source share