Open florinpop17 opened 4 years ago
Hi
// define a function to determine random numbers between two values
function numRandom(min, max) {
return Math.floor(Math.random() * (max - min + 1) + min)
}
// call to the function in output
let output = numRandom(1,9)
// minimum number = 1
// maximum number = 9
console.log(output)
// number 1 ~ 9
7
I was just going through your repository of ideas and saw this other one with this query. Regards
Create a tutorial showcasing how to generate a random number between 2 given numbers using JavaScript.