title: Why document.write('\ud83d\ude00') can output a emoji in HTML which is UTF-8 charset?
body: <p>This is html file:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;title&gt;emoji&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      \ud83d\ude00
      &lt;script&gt;
          var string = '\ud83d\ude00';
          document.write(string);
          console.log(string);
      &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>The unicode '\ud83d\ude00' in body tag can't show as a emoji but a string. But '\ud83d\ude00' can show as a emoji by document.write() and console.log() even thought the document charset is UTF-8.  Why?</p>