Simple javascript issue
<p>It turns out this does exactly what I want it to do. But HTML does not replace the function call with a value, which is why I got confused. The correct value IS passed into the array though. I am leaving this question here in case others have the same issue.</p>

<p>I have some javascript:</p>

<pre><code>&lt;script type="text/javascript"&gt;
    var $SAT = $SAT || [];
    $SAT.push(['setContent','subtype','sub']);
    $SAT.push(['setUser', '1234']);
&lt;/script&gt;
</code></pre>

<p>but I want to replace 'sub' with a function call to retrieve the value by other means, like so:</p>

<pre><code>&lt;script type="text/javascript"&gt;
    function getValue() {
        return 'Some Value';
    }
    var $SAT = $SAT || [];
    $SAT.push(['setContent','subtype',getValue()]);
    $SAT.push(['setUser', '1234']);
&lt;/script&gt;
</code></pre>

<p>however the resulting code does not replace the getValue() function call with 'Some Value' as I would have expected. Does anybody know why, and what I need to do to fix this?</p>

<p>Much appreciated!</p>
