title: Converting a string into decimal number in JavaScript
body: <p>If I have a string (i.e "10.00"), how do I convert it into decimal number? My attempt is below:</p>
  
  <pre><code>   var val= 10;
     val = val.toFixed(2);
     val= Number(val); // output 10 and required output 10.00
  </code></pre>