What is the different between substr and substring?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/3745515/what-is-the-difference-between-substr-and-substring">What is the difference between substr and substring?</a>  </p>
</blockquote>



<p>I just want to clarify this differences of:-</p>

<pre><code>alert("abc".substr(0,2));
alert("abc".substring(0,2));
</code></pre>

<p>the above case both will return</p>

<p><code>ab</code></p>

<pre><code>alert("abc".substr(1,2));
alert("abc".substring(1,2));
</code></pre>

<p>and the above case will return first <code>bc</code> and the second one <code>b</code></p>

<p>so basically for the <code>substr</code> the second argument is the length it has to go?
and for <code>substring</code> it will stop but not include??</p>

<p>Please correct me if I'm wrong because we will have a quiz today and I don't want to get this wrong again.</p>
