How can I convert my string to a number in Javascript?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/12040769/how-to-convert-string-variable-to-int-in-javascript">How to convert String variable to int in javascript?</a>  </p>
</blockquote>



<p>I have the following:</p>

<pre><code>var dataElapsed = $("#stats-list").attr("data-elapsed");
</code></pre>

<p>This creates a string called dataElapsed but I expect a number. How can I convert this?</p>

<p>Is there some way to convert with JQuery? or do I have to use some Javascript way?</p>
