Passing javascript to a function
<p>Can I pass some Javascript to a function and then execute that Javascript from within the function, e.g.</p>

<pre><code>test("a = 1; b = 2; test2(a,b);");

function test(js) {
// execute dynamically generated JS here.
}
</code></pre>

<p>Basically I have some code that is generated on the server and I want to pass that code to a JS function which when it has finished processing it executes the code passed as a parameter.</p>

<p>This could also be useful for the parameter of setTimeout, then the code passed could be executed in the timeout event.</p>

<p>Can this be done?</p>
