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