title: How come my Function Will Not Work When Calling .js File in HTML
body: <p>Hey guys i've been getting really frustrated with the code..i am trying to call a .js file on my html but its currently not working :( i know that the code and everything is right but it will not perform the function. Are you guys able to see if my code is correct?</p>
  
  <p>This is my HTML Code.</p>
  
  <pre><code>&lt;button type="button" onclick="myFunction1()"&gt; Press Me!! &lt;/button&gt;
  &lt;script type="text/javascript" src="Test2.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>This is my JS Code that i am trying to call on html:</p>
  
  <pre><code>&lt;!DOCTYPE HTML&gt;
  &lt;html&gt;
  &lt;head&gt; 
  &lt;title&gt; Lab 4 - Task 2.2&lt;/title&gt;
  &lt;script type = "text/javaScript"&gt; &lt;/script&gt;
  &lt;p id="demo"&lt;/p&gt;
  &lt;button onclick="myFunction1()"&gt; Press &lt;/button&gt;
  &lt;script&gt;
  function myFunction1()
  {
  var x;
  var number1=prompt("Please Enter a Number", "");
  var number2=prompt("Please Enter a Second Number", "");
  var number3=prompt("Please Enter a Third Number", "");
  var number4=prompt("Please Enter a Fourth Number", "");
  document.getElementById("demo").innerHTML= Math.max (number1, number2, number3, number4);
  }
  &lt;/script&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>The code works when i run it as a html file on the web-browser, but when i convert the file to .js it does not work when calling from HTML. Am i doing something wrong here? </p>
  
  <p>Assistance would be much appreciated.</p>