This site is mobile accessible. Press the "Tap Here" button to use a smaller font-size.

Smartphone icons created by Freepik - Flaticon

JS Math

Math.floor(Math.random() * 10) + 1; returns a random integer between 1 and 10 (both included):

document.getElementById("demo").innerHTML =
Math.floor(Math.random() * 10) + 1;