Run ❯
Get your
own
website
Result Size:
625 x 565
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <body> <h1>JavaScript Crypto API</h1> <h2>The crypto.getRandomValues() Method</h2> <p id="demo"></p> <script> const myArray = new Uint32Array(10); let text = ""; crypto.getRandomValues(myArray); for (const num of myArray) { text += num + "<br>" } document.getElementById("demo").innerHTML = text; </script> </body> </html>