title: calling functions in html from external javascript file
body: <p>This is a simple practical but I'm not sure what I'm doing wrong.<br>
  I have the following code in my external javascript file:</p>
  
  <pre><code>function myname(){
      document.write("Monique");  
  }
  
  function welcomeW(name){
      document.write("Welcome " + name + "!");
  }
  
  function welcomeR(name){
      return "Welcome " name "!";
  }
  </code></pre>
  
  <p>I added this <code>&lt;script&gt;</code> tag to link to my html file:</p>
  
  <pre><code>&lt;script src="script.js" type="text/javascript"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>I tried calling the functions in html using:</p>
  
  <pre><code>&lt;script&gt; myname(); &lt;/script&gt;
  &lt;script&gt; welcomeW(Monique); &lt;/script&gt;
  &lt;script&gt; welcomeR(Monique); &lt;/script&gt;
  </code></pre>
  
  <p>when I wrote the function in html it worked, but in the external file nothing happens.</p>