There is the Math.random()
function in JavaScript. But this is not the answer, because I want to know how to generate a random number without this function, just pure randomness.
Asked
Active
Viewed 51 times
0

jonrsharpe
- 115,751
- 26
- 228
- 437

Emiel VdV
- 296
- 2
- 9
-
2True randomness doesn't exist, even outside of programming (IMO) – CertainPerformance Mar 10 '22 at 16:56
-
1check out https://www.random.org/, maybe they have an API. or somebody else might have created a 3rd-party API for it. then you could make async calls to this API to get a random number. – szaman Mar 10 '22 at 16:57
-
I get it, it does not exist. But try to at least think about it. And not immediately suggest other answers or API’s. Because that does not answer my question – Emiel VdV Mar 10 '22 at 17:01
-
@CertainPerformance - in quantum physics it does – vsync Mar 10 '22 at 17:01
-
1Please see this [language proposal](https://github.com/tc39/proposal-seeded-random) – vsync Mar 10 '22 at 17:05
-
Looking for a [random.org](https://random.org) API is a good suggestion. Comments don't need to answer the question. They generate their randomness using real world data like cameras pointed at lava lamps so they can achieve higher levels of entropy, which is presumably what you mean by "true randomness" – byxor Mar 10 '22 at 17:13
-
1check out [ https://github.com/lordpoint/xorshift-sandbox-and-visualizer ] – Nilesh Mishra Mar 10 '22 at 17:17