title: Storing javascript variable in html
body: <p>So far in my javascript, I have this code: 
  <a href="https://i.stack.imgur.com/wsVQy.png" rel="nofollow noreferrer">!/Users/me/Desktop/Screen Shot 2017-07-19 at 2.15.40 PM.png</a></p>
  
  <pre><code>@import "MochaJSDelegate.js";
  @import 'common.js';
  
  var word = "some kind of file";
  function getWord(){
      return word;
  }
  </code></pre>
  
  <p>And I want to be able to use the "word" variable in my html over here:</p>
  
  <p><a href="https://i.stack.imgur.com/9qQaH.png" rel="nofollow noreferrer">enter image description here</a></p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html&gt;
    &lt;head&gt;
      &lt;title&gt;&lt;/title&gt;
        &lt;link rel="stylesheet" href="style3.css"&gt;
        &lt;script src="https://sdk.amazonaws.com/js/aws-sdk-2.1.12.min.js"&gt;&lt;/script&gt;
        &lt;script src = "../Sketch/login.js"&gt; &lt;/script&gt;
    &lt;/head&gt;
  
  
    &lt;body&gt;
  
  
  
      &lt;div&gt;
  
          &lt;div class = "title"&gt;
            Botworx Sketch Plugin
          &lt;/div&gt;
  
  
          &lt;div class = "input-login"&gt;
            &lt;button onclick="displayFormContents(this.form);"&gt;Login&lt;/button&gt;
          &lt;/div&gt;
  
          &lt;div class = "input-uploadImages"&gt;
            &lt;button onclick="displayFormContents(this.form);"&gt;Upload Images Only&lt;/button&gt;
          &lt;/div&gt;
          &lt;div class = "input-uploadGalleryData"&gt;
            &lt;button id = "upload-gallery"&gt;Upload Gallery Data&lt;/button&gt;
          &lt;/div&gt;
          &lt;div class = "input-uploadAll" &gt;
            &lt;button id="uploadEverything"&gt;Upload Everything&lt;/button&gt;
          &lt;/div&gt;
          &lt;input type="file" id="file-chooser" /&gt;
  
  
  
              &lt;div id="results"&gt;&lt;/div&gt;
  
              &lt;div id="fb-root"&gt;&lt;/div&gt;
  
          &lt;button id="upload-button"&gt;Upload to S3&lt;/button&gt;
  
  
  
  
      &lt;/div&gt;
  
  &lt;script&gt;
    alert(getWord());
  &lt;/script&gt;
  </code></pre>
  
  <p>The highlighted line is my reference to the javascript file. When I use a  tag and try to use my function: "getWord()" in html, nothing happens. I have tested things out and found out that html does not like the words "import" and "@import". I need these keywords in my javascript file though. </p>
  
  <p>My question is how do I access my javascript file when it uses @import? </p>