Is there a way to do function overloading in Javascript?
<p>I have code that looks like this:</p>

<pre><code>function getTopicOptions(accountID, showTitles, showSelectGroup) {
    "use strict";

    var accountID = store.getItem('AccountID');  
    showTitles = (showTitles !== 'undefined') ? showTitles : 'Y';
    showSelectGroup = (showSelectGroup !== 'undefined') ? showSelectGroup : 'Y';
</code></pre>

<p>The idea is that if showTitle and showSelectGroup are not supplied then they will get the default of "Y".  </p>

<p>Is there a way do this with function overloading or a way to have the function parameters checked (jslint?) or a way to simplify what I need to do without the undefined check?</p>
