Open kartamyshev opened 4 years ago
Example: random(20, 40).
random(20, 40)
Tip: Javascript has built in function Math.random() that returns random number between 0 and 1
Math.random()
function randomInteger() { min = +prompt("number1"); max = +prompt("number 2") return min + Math.ceil(Math.random() * (max - min)); } alert(randomInteger());
Example:
random(20, 40)
.Tip: Javascript has built in function
Math.random()
that returns random number between 0 and 1