JavaScript saving document.write in a variable and calling it
<p>I'm trying to pass <code>document.write</code> as a reference to a variable:</p>

<p>Example:</p>

<pre><code>var f = document.write

//then
f('test');
</code></pre>

<p>It works with alert. Why doesn't it work with <code>document.write</code>?</p>
