JavaScript equivalent of PHP passing parameter
<p>In PHP, I've used this:</p>

<pre><code>do_it( $var2 = 'something_cool' );

function do_it( $var1, $var2 ) {
// does something
}
</code></pre>

<p>In JavaScript, I'm not quite sure the notation.</p>

<pre><code>do_it( var2 = 'something_cool' ); // This isn't right, I don't think.

function do_it( var1, var2 ) {
// does something
}
</code></pre>

<p>I want to define var2 but leave var1 empty. What should my do_it look like for the line in question?</p>
