Printing out a javascript variable (not showing up?)
<p>I want to make sure a javascript variable is getting the correct values passed into it when setting it to a ruby variable.</p>

<pre><code>&lt;script type="text/javascript" charset="utf-8"&gt;

   var test = &lt;%= @test || 'null' %&gt;;
   document.write(test);

&lt;/script&gt;
</code></pre>

<p>However, there doesn't seem to be any output whatsoever. I've tried just <code>document.write("somethinganything")</code> and I still don't see any output. Is it supposed to appear on webpage or terminal? I couldn't find any in both. </p>
