title: Javascript conditional statements with range input values
body: <p>could someone help me with the following Javascript code. I want the conditional statements to execute if the value of "score" is between the ranges of 1-3, 3-5, 5-7, 7-9 and 9-10.</p>
  
  <p>Currently, they only execute if the variable "score" is an integer, but I want the scores to be executed between the range of numbers.</p>
  
  <p>for example, I want the line "if ((score==1) || (score==2) || (score==3))" to be something like if( score is between 1 and 3), Then the statement will be executed.</p>
  
  <p>This is the HTML:</p>
  
  <pre><code>Input 1 &lt;input type="number" id="num1"&gt;
      &lt;br&gt;
      &lt;br&gt;
      Input 2 &lt;input type="number" id="num2"&gt;
      &lt;br&gt;
      &lt;br&gt;
      Input 3 &lt;input type="number" id="num3"&gt;
      &lt;br&gt;
      &lt;br&gt;
      Input 4 &lt;input type="number" id="num4"&gt;
      &lt;br&gt;
      &lt;br&gt;
      Input 5 &lt;input type="number" id="num5"&gt;
      &lt;br&gt;
      &lt;br&gt;
      &lt;button onclick="calculate()"&gt;Calculate&lt;/button&gt;
  
  &lt;h1 id="answer"&gt;&lt;/h1&gt;
  &lt;h1 id="advice"&gt;&lt;/h1&gt;
  </code></pre>
  
  <p>This is the JS:</p>
  
  <pre><code>            function calculate()
          {
           var field1=document.getElementById("num1").value;
           var field2=document.getElementById("num2").value;
           var field3=document.getElementById("num3").value;
           var field4=document.getElementById("num4").value;
           var field5=document.getElementById("num5").value;
  
           if ( (field1&gt;10) || (field1&lt;1)|| (field2&gt;10) || (field2&lt;1) || (field3&gt;10) || (field3&lt;1) || (field4&gt;10) || (field4&lt;1) || (field5&gt;10) || (field5&lt;1))
  
           {
              alert("Enter a number between 1 and 10");
              return false;
          }
  
           var result=parseFloat(field1)+parseFloat(field2)+parseFloat(field3)+parseFloat(field4)+parseFloat(field5);
  
           var score= result / 5;
  
  
  
  
              if ((score==1) || (score==2) || (score==3))
  
           {
  
              document.getElementById("advice").innerHTML="You are between 1 and 3";
  
              }
  
              if ((score==4) || (score==5))
  
           {
  
              document.getElementById("advice").innerHTML="You are between 4 and 5";
  
              }
  
              if ((score==6) || (score==7))
  
           {
  
              document.getElementById("advice").innerHTML="You are between 6 and 7";
  
              }
  
              if ((score==8) || (score==9))
  
           {
  
              document.getElementById("advice").innerHTML="You are between 8 and 9";
  
              }
  
              if ((score==10))
  
           {
  
              document.getElementById("advice").innerHTML="You are 10";
  
              }
  
           if(!isNaN(score))
  
              {
  
              document.getElementById("answer").innerHTML="Your career score is " + score;
  
              }
  
  
          }
  </code></pre>
  
  <p>Help will be super appreciated!</p>