title: Uncaught SyntaxError: Unexpected end of input in simple html javascript
body: <p>My html page looks like below</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;script&gt;
  
  function changeColorAndSize(){
  {
      document.getElementById('demo').style.color='red'
      document.getElementById('demo').style.fontSize='100px'
  }
  &lt;/script&gt;
  
  &lt;h2&gt;What Can JavaScript Do?&lt;/h2&gt;
  
  &lt;p id="demo"&gt;JavaScript can change the style of an HTML element.&lt;/p&gt;
  
  &lt;button onclick="changeColorAndSize()"&gt;Click Me!&lt;/button&gt;
  
  
  &lt;/body&gt;
  &lt;/html&gt; 
  </code></pre>
  
  <p>but it fails with error 
  <strong>Uncaught SyntaxError: Unexpected end of input</strong></p>
  
  <p>Please advise what is wrong with this code? I tried looking into w3schools but still no luck. </p>