title: javascript comparison not working properly?
body: <p>stockQty is 200 and $("#txtQty").val() is 5 but it always go inside else. Why? I get stockQty value from object and declare stockQty as global variable and use it from another function. I tried to output both value and they are 200 and 5. What's wrong?</p>
  
  <pre><code>if(stockQty&gt;0 &amp;&amp; $("#txtQty").val() &lt;= stockQty){}
  else{}
  </code></pre>