I have code that looks like this:
function getTopicOptions(accountID, showTitles, showSelectGroup) {
    "use strict";
    var accountID = store.getItem('AccountID');  
    showTitles = (showTitles !== 'undefined') ? showTitles : 'Y';
    showSelectGroup = (showSelectGroup !== 'undefined') ? showSelectGroup : 'Y';
The idea is that if showTitle and showSelectGroup are not supplied then they will get the default of "Y".
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?
 
     
     
     
    