title: javascript, best way to tell if a val is a single digit
body: <p>whats the best way to tell if a value in javascript is a single digit.  Ive been doing something like</p>
  
  <pre><code>var valAsString = '' + val;
  if (valAsString.match(/\d/) {}
  </code></pre>
  
  <p>clarification:  I mean one of 0,1,2,3,4,5,6,7,8,9</p>
  
  <p>Also, should what I have work?  Im surprised how many different ways people are coming up with for this.</p>