7. more practice with the switch- number ranges?


#1

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

hello.
Can some1 show me how to properly do number parameters?
I get a pass when i run this code but the output is always the ‘default’.

Any help is appreciated.

```

var answer = prompt(“How old are you?”);

switch(answer) {
case answer<10:
console.log(“you are young”);
break;
case 10<answer && answer<25:
console.log(“you are getting older”);
break;
default:
console.log(“■■■■, u old”);
break;

}

<do not remove the three backticks above>

#2

You should add if statement to your case so you can check conditions like this ^