To create a random whole number within a range this piece of code works:
Math.floor(Math.random() * (max - min + 1)) + min
but I thought about it and logically this should work too:
Math.floor(Math.random() * (max - min) + min)
because if we put numbers in this it results in this:
Math.floor(0.999 * (90 - 30) + 30)
it results in 90 since Math.floor make it a whole number
which if we console.log should give us between 30 and 90 but in the curriculum it is written that it cannot go to the maximum. Is it because it just takes the whole number and not the closest whole number?