JavaScript Exercise with Random Number Generator and Pairing