title: I can't figure out why my JavaScript file won't display when linked
body: <p>I can't figure out what's wrong here and I'm not getting any output from the Javascript file. I am trying to use src to be able to type my javascript file outside of the index file. This just prints the header from the html file "A test heading" without printing the text variable. If I type the code within the html file it works fine. Both scripts are in the same folder.     </p>
  
  <pre><code>&lt;!DOCTYPE HTML&gt;
  
  &lt;html&gt;
  &lt;head&gt;
      &lt;h2&gt;
      A Test Heading
      &lt;/h2&gt;
      &lt;script language = "JavaScript" src="/slider.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Here's the file labeled slider.js - </p>
  
  <pre><code>function slider(){  
  var text = "Welcome to Slider Simulator 2013!";
  
  document.write(text);
  }
  slider();
  </code></pre>