title: Null character in strings
body: <p>Consider this string:</p>
  
  <pre><code>var s = "A\0Z";
  </code></pre>
  
  <p>Its length is 3, as given by <code>s.length</code>. Using <code>console.log</code> you can see the string isn't cut and that <code>s[1]</code> is <code>""</code> and <code>s.charCodeAt(1)</code> is <code>0</code>.</p>
  
  <p>When you alert it in Firefox, you see <code>AZ</code>. When you alert it in Chrome/Linux using <code>alert(s)</code>, the <code>\0</code> terminates the string and you see <code>A</code>.</p>
  
  <p>My question is: what <strong>should</strong> browsers and Javascript engines do? Is Chrome buggy here? Is there a document defining what should happen?</p>
  
  <p><em>As this is a question about standard, a reference is needed.</em></p>