Get the latest tech news
Exploring Randomness in JavaScript
Ben Nadel compares the randomness of Math.random() to crypto.getRandomValues() in JavaScript.
To this end, I want to try generating some random visual elements using both Math.random() and crypto.getRandomValues() to see if one of the methods feels substantively different. With these two methods in place, I can then assign one of them to a randFloat() reference which can be used to seamless generate random values along a given range using either algorithm interchangeably: When the component is initialized, it will populate these two refs with random values using the methods, fillCanvas() and fillList(), respectively.
Or read this on Hacker News