My syntax Error, anyone knows HOW ?!

const lifePhase = (age)={
switch(age){
case (age < 4):
return ‘baby’;
break;
case (age < 13):
return ‘child’;
break;
case (age < 20):
return ‘teen’;
break;
case (age < 65):
return ‘adults’;
break;
case (age < 141):
return ‘senior citizen’;
break;
default:
return ‘This is not a valid age’;
break;
}
}

Are you sure that this is correct?

1 Like