title: Switch statement not working, just goes straight to default
body: <p>Hi I am learning javascript and understand the concepts of switch statements having used them in php but for some reason the below just isn't working and i dont get why!  Changed it to an if statement and it works but for this task we have to use switch statement.</p>
  <pre><code>// function to calculate player rank 
   function calcRank(points){
      let rank = &quot;&quot;;
       switch (points){
          case points &lt;1600:
              rank = &quot;no rank&quot;;
              break;
          case points &lt;1800:
              rank = &quot;class B&quot;;
              break;
          case points &lt;2000:
              rank = &quot;class A&quot;;
              break;
          case points &lt;2200:
              rank = &quot;Expert&quot;;
              break;
          case points &lt;2400:
              rank = &quot;National Master&quot;;
              break;
          case points &gt;= 2400:
              rank = &quot;Senior Master&quot;;
              break;
          default:
              rank = &quot;unranked&quot;;
       }
       
       return rank;
   }
   
   //function to display rank
   function displayRank(){
       console.log(calcRank(2500));
   }
  
  displayRank();
  </code></pre>