Hi im new to programming.
The variable age = 4 should output "You get an allowance" but the switch statement keeps going to default?
<script>
var age = 4;
switch (age){
case (age> 65):
document.write("you get your income from your pension")
break;
case (age < 18):
document.write("you get an allowance")
break;
case( 18<age<=65):
document.write("each month you get a salary")
break;
default:
document.write("The value of the age variable is not numerical")
break;
}
</script>