Answer:
function userAgeCheck(event){
// if age is in range 18 to 100
// parseInt() converts string into integer
if( parseInt(userAge.value) >= 18 && parseInt(userAge.value) <= 100 ){
// set color to light green
document.body.style.backgroundColor = "green";
userAgeValid = true;
}
else{
// set color to orange
document.body.style.backgroundColor = "orange";
userAgeValid = false;
}
}
Step-by-step explanation: