title: javascript function reports issue missing semicolon, what is the error?
body: <p>I have a very simple function, yet it gives the statement &quot;missing semicolon&quot;.</p>
  <p>The code is as follows:</p>
  <pre><code>window.onload = function () {
      var title = document.getElementsByTagName(&quot;title&quot;)[0].innerHTML;
      document.getElementsByTagName(&quot;H1&quot;)[0].innerText = title;
  }
  </code></pre>
  <p>What am i missing here?</p>