title: if statement with decimal digits not recognized in Javascript
body: <p>I have an If statement to change the colour of the inner text if the integer value is &lt;=10.0</p>
  <pre><code>info_1[1].innerText        = energystatus[1];  //energystatus[1] value is a string type
  
  var energystatusint1 = parseInt(energystatus[1]) //converting to int
  
  if (energystatusint1 &lt;= 10.0){
  
      info_1[1].style.color  =&quot;rgb(255,83,73)&quot;; 
  
  }
  </code></pre>
  <p>But what's happening now is that the text colour changes when the value is 10.9 and below, and not &lt;=10.0,
  I have tried putting &quot;==&quot; and still that's the result. I think the if statement is not reading the decimal places, but just values before the decimal. I don't know if my conversion from string to integer is 100 percent right?</p>
  <p>I know that in normal cases it would work because i have tried this simple code
  with changing the values of  variable &quot; a&quot; around and it works perfectly.</p>
  <pre><code> var a =10.5;  //tried lower numbers as well
      
      if ( a &lt;=10.1){
      
          console.log(&quot;less than 10.1&quot;)
      }
  </code></pre>
  <p>Can someone correct what I'm doing wrong. Thanks a lot for your time.</p>