Math.random and mixture of letters abcd etc

Viewed 3704

I'm generating a random number with the code below:

Math.floor((Math.random() * 9999) * 7);

Some of the results I'm getting:

45130,
2611,
34509,
36658

How would I get results like this(with 2 letters included):

TT45130,
PO2611,
KL34509,
GH36658

Side question:

What is the range of numbers that Math.random() carries? Can I set a specific range of values? Not necessary to answer but just curious.

6 Answers
Related