Why is my Javascript Switch Statement is not working? : <p>So, firstly i wrote the input prompt to achieve data ( don't know what kind of data is this? Number? ) then i calculate it with function and return it. I intend to categorize the calculation result and return it to user as an comment and status. But it won't work. Is it because the variable i used isn't right and the data type is false? Help me please.</p>

<p>Here is my code :</p>

<pre><code>userName = prompt("Please enter your name: ");
alert("Welcome to BMI Calculator, " + userName + "!");
bodyHeight = prompt("Please enter your body height in centimeter :");
bodyHeight = bodyHeight / 100;
alert("Your height is : " + bodyHeight +" meter");
bodyWeight = prompt("Please enter your body weight in kilogram :");
alert("Your body weight is : " + bodyWeight + " kilogram");
confirm("Do you wish to calculate your ideal weight?");
function idealWeight(){
    return bodyWeight / (bodyHeight * bodyHeight);
}
var idealWeight = idealWeight();
idealWeight = idealWeight.toFixed(2);
idealWeight = Number(idealWeight);
switch (idealWeight){
    case idealWeight &lt; 18.5:
        alert("You are too skinny. Eat a lot man!");
        break;
    case 18.5 &lt; idealWeight &lt; 25:
        alert("You have a normal weight. Keep in the pace");
        break;
    case 25 &lt; idealWeight &lt; 30:
        alert("You are overweight. Lower it a little!");
        break;
    case idealWeight &gt; 30:
        alert("You are totally obessed. I know a gym near here");
        break;
}
alert("Your ideal weight is: " + idealWeight);
let key = userName + " BMI Value";
localStorage.setItem(key,idealWeight);
</code></pre>
