How can I return two parameters from a javascript function?
<p>I have the following:</p>

<pre><code>function getPk(entity) {
    var store = window.localStorage;
    switch (entity) {
        case "City":
            if (store.getItem('AccountID')) {
                // Need to return both of the below pieces of information
                return store.getItem('AccountID') + "04" + "000";
                return "CityTable";

            } else {
                paramOnFailure("Please reselect"); 
                return false;
            }
            break;
</code></pre>

<p>The problem is I need to be able to call this function and return two strings. Here I show two return statements but I know I cannot do that. </p>

<p>Is there a clean way I can return two strings to the function that calls my getPk(entity) function?</p>

<p>If possible can you give an example also of how I can read what is returned.</p>
