JavaScript: How to pass an anonymous function as a function parameter?
<p>I would like to write a function that accepts an anonymous function as a parameter. For example:</p>

<pre><code>run('param1', function(){
    alert('execute this');
});

function run(param1, callback) {
    //now execute the callback parameter as a function
}
</code></pre>

<p>How can I achieve something like this?</p>
