title: Print result of JS file in html
body: <p>So I have an html file with the following code:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      document.write(getHighestCacheMan());
  &lt;/script&gt;
  </code></pre>
  
  <p>And I have this Javascript code in a .js file with the code:</p>
  
  <pre><code>function getHighestCacheMan()
  {
      var cache = currentCaches[0];
      for(var i = 1; i &lt; currentCaches.length; i++) {
      if(currentCaches[i].altitude != -32768)
          if(currentCaches[i].altitude &gt; cache.altitude)
          cache = currentCaches[i];
      }
      return cache.name;
  }
  </code></pre>
  
  <p>The files are correctly linked together and everything else that is intertwined between files works as intended.</p>
  
  <p>It doesn't show anything.
  Is there any other way to do this ?</p>