If you want cryptographic-quality random numbers, both Java and Javascript have them. Math.random() is simply a super-fast decent RNG.<p>Example:<p><pre><code> var buf = new Uint32Array(10);
window.crypto.getRandomValues(buf);
console.log(buf);
</code></pre>
Outputs things like:<p><pre><code> [4027145128, 258543382, 1205615760, 2665675208, 4033127244,
2280027866, 3983484449, 510932333, 1911490534, 2609399642]
</code></pre>
This works in Chrome and FF.<p>IE11 has Crypto.getRandomValues(...)<p>Java has SecureRandom:<p><a href="http://docs.oracle.com/javase/6/docs/api/java/security/SecureRandom.html" rel="nofollow">http://docs.oracle.com/javase/6/docs/api/java/security/Secur...</a>