Answer:
The answer to this question is given below in the explanation section
Explanation:
This is a javascript function. To return a value between the range of two numbers, we can use the following function "getRandom" that takes a minimum value and maximum value.
function getRandom(min, max) {
return Math.random() * (max - min) + min;
}
However, the correct code to produce a random value in the range of 1 to 6 using expression is :
Math.random() * (6-1) + 1;
this line of code return random number in rand of 1 to 6.