Hiding element with reflow in JavaScript and how is it different from CSS hidden property?
<p>I have two buttons, one passes <strong>true</strong> argument, another does not. Both buttons disappear when I press on them. But what exactly is going on behind the scenes for each button?</p>

<p>If this code looks familiar to you, it's from <a href="http://rads.stackoverflow.com/amzn/click/0596101996" rel="nofollow">JavaScript: The Definitive Guide 6th Edition</a>. Great book!</p>

<p>One more thing. In <strong>C++</strong> and <strong>Java</strong> omitting an argument would result in a compile-error. 
In <strong>C#</strong> you could change the second argument to be optional and it would work. In <strong>JavaScript</strong> I didn't have to do that. Are all arguments in JavaScript optional?</p>

<p><strong>JavaScript:</strong></p>

<pre><code>function hide(e, reflow) {
    if (reflow) {
        e.style.display = "none";
    }
    else {
        e.style.visibility = "hidden";
    }
}
</code></pre>

<p><strong>HTML:</strong></p>

<pre><code>&lt;button onclick="hide(this,true); debug('hide button 1');"&gt;Hide1&lt;/button&gt;
&lt;button onclick="hide(this); debug('hide button 2');"&gt;Hide2&lt;/button&gt;
</code></pre>
