title: How to return all except last 2 characters of a string?
body: <pre><code>id = '01d0';
  document.write('&lt;br/&gt;'+id.substr(0,-2));
  </code></pre>
  <p>How can I take a string like '01d0<code>and get the</code>01` (all except the last two chars)?</p>
  <p>In PHP I would use <code>substr(0,-2)</code> but this doesn't seem to work in JavaScript.</p>
  <p>How can I make this work?</p>