title: Javascript custom sort with blanks
body: <p>I am using the following code to sort a 2d array by column1 with a custom sort order, blanks naturally process as undefined and this is causing a problem when the array contains a series of blank rows. I would like undefined to basically behave as if it equaled 4 for the purpose of my sorting. I'm wondering if I should implement some sort of switch statement to handle this situation but want to retain speed and code brevity.</p>
  
  <pre><code>  var sortBy = {  
      "Order": 0,
      "This": 1,
      "Way": 2,
      "Please": 3,
    };
  
   values.sort(function(a, b){  
     return sortBy[[a[0]][0]] - sortBy[[b[0]][0]];
    });
  </code></pre>