Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<body>
<h1>JavaScript Math</h1>
<h2>The Math.random() Method</h2>
<p>Math.random()*10 returns a random number between 0 and 10:</p>
<p id="demo"></p>
<script>
let x = Math.floor((Math.random() * 10) + 1);
document.getElementById("demo").innerHTML = x;
</script>
</body>
</html>