title: Assign JavaScript function value to a Freemarker variable
body: <p>I have a JavaScript function in my Freemarker file as follows:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
    function myFunc(){
      var myString = "I like pizza";
      return myString;
    }
  &lt;/script&gt;
  </code></pre>
  
  <p>I am trying to assign the myString return value from myFunc to myVar in Freemarker as follows:</p>
  
  <pre><code>&lt;#assign myVar = myFunc()&gt;
  </code></pre>
  
  <p>Unfortunately, the value of myVar is an ampty String ("").
  What am I doing wrong?</p>