function randomMinMax(min, max) {
return Math.floor(Math.random() * (max - min + 1) + min)
}
const min = 6
const max = 18
for (let i = 0; i < 20; i++)
console.log(randomMinMax(min, max));
/*
run:
10
14
15
6
18
17
18
17
6
11
14
7
15
6
15
14
11
18
16
7
*/