title: convert string to integer using Javascript and Jquery
body: <p>I need one help.I have one value ('i.e-001') which datatype is varchar and i convert this into integer and then want to add 1 at each time DB entry.I did something like below.</p>
  
  <pre><code>var newcode=parseInt(response.data.code)+1;
  </code></pre>
  
  <p>Here <code>response.data.code</code> contains the code <code>001</code> and its coming from DB.first user is fetching the latest code(<code>i.e-001</code>) from db and increment by 1 then storing in the DB.In this case i am getting newcode value is <code>2</code> but I should get <code>002</code>,'003',..so on.Please help me. </p>