title: How to write isNumber() in JavaScript?
body: <p>My guess would be:</p>
  
  <pre><code>function isNumber(val) {
      return val === +val;
  }
  </code></pre>
  
  <p>Is there a better way?</p>
  
  <p><strong>Previous Reference</strong></p>
  
  <p><a href="https://stackoverflow.com/questions/18082/validate-numbers-in-javascript-isnumeric/174921#174921">Validate decimal numbers in JavaScript - IsNumeric()</a></p>