Hello I am working on getting a random whole number between the output of two functions my example is below, I do not get an error but it will not work.
function getRndInteger(...args) {
const [low, high] = [Math.min(...args), Math.max(...args)];
return Math.floor(Math.random() * (high - low)) + low + 103;
}
function age(h){
var h = prompt ("How old are you?");
return h;
}
function videogames(i){
var i = prompt ("How many hours of video games have you played last month?");
return i;
}
document.write (getRndInteger(age(h),videogames(i)));
I have to write it out this way because the age and videogames part must be in the form of a function, is this possible?