const min = 0; const max = 10; let rand; rand = Math.floor(Math.random() * (max - min + 1)) + min;

a random number between 0 and 10 inclusive