function resultsComparator(a, b) {
  if (a == null && b == null)
    return 0;
  if (a == null)
    return 1;
  if (b == null)
    return -1;

  return a - b;
}
/*
 * Compare numbers but order null values at the end
 */
Compare numbers but order null values at the end
Compare numbers but order null values at the end
function resultsComparator(a, b) {
  if (a == null && b == null)
    return 0;
  if (a == null)
    return 1;
  if (b == null)
    return -1;
  return a - b;
}
function resultsComparator ( a , b ) { if ( a == null && b == null ) return 0 ; if ( a == null ) return 1 ; if ( b == null ) return - 1 ; return a - b ; }
Compare numbers but order null values at the end
Compare numbers but order null values at the end