title: Javascript - How to convert string '0' to number 0
body: <p>I'm trying to do error handling on 2 input values. I'm using regex to confirm that the input is always a number. The issue I'm having is that I don't want my error handling to kick in if the user literally inputs 0. Right now I'm using: </p>
  
  <pre><code>number = parseInt(incomingValue) || ""
  </code></pre>
  
  <p>to set my variable. The issue is that this turns <code>'0'</code> into <code>""</code></p>
  
  <p>Its fine if an empty value becomes an empty string because I am disabling my error checking when the lengths are equal to <code>0</code>, but I need to properly turn <code>'0'</code> into a number <code>0</code>. Anyone have any ideas?</p>
  
  <p>Additionally, I'd also like to turn <code>'000'</code> (and so forth) into a number <code>0</code></p>