const array = new Uint32Array(10);
self.crypto.getRandomValues(array);
console.log("Your lucky numbers:");
for (const num of array) {
console.log(num);
}Crypto: getRandomValues() method / notebook
Crypto: getRandomValues() method
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.