title: SyntaxError: expected expression, got '<', what does that mean?
body: <p>I know this is asked a few times on S.O.</p>
  
  <p>but none of the answers seem to match my situation . So, I have a a basic Html page which tries to use an external JS. The JS file tries to change the content of a paragraph defined in the HTML on a button click, but does not seem to work.</p>
  
  <p>I see the following errors in console :</p>
  
  <p>1)SyntaxError: expected expression, got '&lt;'</p>
  
  <p>2)ReferenceError: change is not defined</p>
  
  <p>JSFiddle showing exact source?(except that  &amp;  tags are removed as jsfiddle  - <a href="http://jsfiddle.net/p9ko4yde/" rel="noreferrer">http://jsfiddle.net/p9ko4yde/</a></p>
  
  <p>HTML Code :
      
      </p>
  
  <pre><code>&lt;h1&gt; Numbers with external script:) &lt;/h1&gt;
  &lt;p id="number"&gt;1&lt;/p&gt;
  &lt;button type="button" onclick="change()"&gt;Toggle between 1 and 2&lt;/button&gt;
  
  &lt;script src="myScript.js"&gt;&lt;/script&gt;
  
  
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>JS Code :</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      function change(){
          var number = document.getElementById('number').innerHTML;
          if(number == '1'){
              document.getElementById('number').innerHTML='2';
          }
          else{
              document.getElementById('number').innerHTML='1';
          }
      }
  &lt;/script&gt;
  </code></pre>
  
  <p>File Structure is as below:<a href="https://i.stack.imgur.com/NDAGa.png" rel="noreferrer"><img src="https://i.stack.imgur.com/NDAGa.png" alt="enter image description here"></a></p>