title: What is the difference between substr and substring?
body: <p>What is the difference between</p>
  
  <pre><code>alert("abc".substr(0,2));
  </code></pre>
  
  <p>and</p>
  
  <pre><code>alert("abc".substring(0,2));
  </code></pre>
  
  <p>They both seem to output “ab”.</p>