title: Uncaught ReferenceError: echo is not defined at HTMLButtonElement.onclick (index.html:23)
body: <p>I am having a problem with a quite basic bit of javascript to call a function which is just a test alert to check the code I have so far is working. I am getting &quot;Uncaught ReferenceError: echo is not defined     at HTMLButtonElement.onclick (index.html:23)&quot; in the Chrome console.
  Here is my index.html</p>
  <pre><code>&lt;!doctype html&gt;
  &lt;html lang=&quot;en&quot;&gt;
  &lt;head&gt;
  &lt;meta charset=&quot;utf-8&quot;&gt;
  &lt;title&gt;Simple Calculator&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;header&gt;
  
  &lt;/header&gt;
  &lt;nav&gt;&lt;/nav&gt;
  &lt;main&gt;
  
  
   
   &lt;table style=&quot;width:100%&quot;&gt;
    
   &lt;tr&gt;  &lt;th&gt;Fancy Calculator&lt;/hd&gt;&lt;/tr&gt;
   &lt;td&gt;
   &lt;form&gt;
   &lt;label for=&quot;number&quot;&gt;Please enter a number between 0 and 50.&lt;/label&gt;&lt;br&gt;
   &lt;input type=&quot;text&quot; id=&quot;number&quot; name=&quot;number&quot;&gt;&lt;br&gt;
   &lt;button type=&quot;button&quot; onclick=&quot;echo(number.value)&quot;&gt;Calculate!&lt;/button&gt;&lt;br&gt;
  
    
   &lt;input type=&quot;text&quot; id=&quot;factorial&quot; name=&quot;factorial&quot; disabled&gt;!&lt;br&gt;
   &lt;input type=&quot;text&quot; id=&quot;squared&quot; name=&quot;squared&quot; disabled&gt;&amp;sup2;&lt;br&gt;
   &lt;input type=&quot;text&quot; id=&quot;cubed&quot; name=&quot;cubed&quot; disabled&gt;&amp;#xB3;&lt;br&gt;    
   &lt;/form&gt; 
   &lt;/td&gt;
   &lt;/tr&gt;
    
  &lt;/table&gt; 
    
    
  &lt;/main&gt;
  &lt;footer&gt;
  &lt;!--- Script 2.1 - template.html --&gt;
  &lt;script src=&quot;js/calc.js&quot;&gt; 
  &lt;/footer&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  <p>Here is my calc.js file:</p>
  <pre><code>/* calc.js */
  
  console.log(&quot;Hello&quot;);
  
  function echo( number ) {
      alert(&quot;You entered&quot;, + number + &quot;!&quot;);
  }
  
  </code></pre>
  <p>Any help would be much appreciated.</p>