title: check if number string contains decimal?
body: <p>After doing a sqrt()</p>
  
  <p>How can I be check to see if the result contains only whole numbers or not?</p>
  
  <p>I was thinking Regex to check for a decimal - if it contains a decimal, that means it didn't root evenly into whole numbers. Which would be enough info for me. </p>
  
  <p>but this code isnt working...</p>
  
  <pre><code>result = sqrt(stringContainingANumber);
  decimal = new RegExp(".");
  document.write(decimal.test(result)); 
  </code></pre>
  
  <p>I bet there's other ways to accomplish the same thing though.</p>