How to check which argument has been passed to a function
<p>I'd like to make a call to another jQuery function and pass another argument - the argument I pass depends on the name of the argument that was passed to the original function. So i might have something like this:</p>

<pre><code>matchedNumbers1 = compareArrays(userNumbers, winningNumbers1, matchedNumbers1);
matchedNumbers2 = compareArrays(userNumbers, winningNumbers2, matchedNumbers2);
matchedNumbers2 = compareArrays(userNumbers, winningNumbers3, matchedNumbers2);

//COMPARE INPUTTED ARRAY OF NUMBERS TO WINNING ARRAYS OF NUMBERS
    function compareArrays (userInput, winningNums, matches) {
        matches = 0;
        allMatchedNumbers.length = 0;
        $(userInput).each(function(i) {
            $(winningNums).each(function(j) {
                if (userInput[i] == winningNums[j]) {
                    allMatchedNumbers[matches] = userInput[i];
                    matches++;
                }
            });
        });
        switch (winningNums) {
            case 'winningNumbers1':
                alert("!!!!!");
                markMatches(ListItems1);
                break;
            case 'winningNumbers2':
                markMatches(ListItems2);
                break;
            case 'winningNumbers3':
                markMatches(ListItems3);
                break;
        }
        return matches;
    }
</code></pre>

<p>Hopefully the code above makes it clear what i'm trying to do. I tried using a <code>switch</code> statement but this only compares the value and not the name of the original argument that was passed to the function. Any help would be appreciated.</p>
