I have just started with Javascript and trying to learn, just the basic stuff at the moment.
But the thing is I honestly dont get how this switch statement returns false
if age = 0
function isUnderAge(age){
const MAXNUMBER = 120;
const MAXAGE = 18;
const MINAGE = 0;
switch(age){
case(age < MAXAGE && age >= MINAGE && age <= MAXNUMBER):
return true;
default:
return false;
}
}
console.log(isUnderAge(0));
Does anyone else see the issue?
Any help would be highly appreciated!