×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Javascript
Posted by: Matthew Speicher
Added: Jun 24, 2016 2:19 PM
Views: 3
Tags: no tags
  1. function compare(a,b) {
  2.             if (a.last_nom < b.last_nom)
  3.                 return -1;
  4.             else if (a.last_nom > b.last_nom)
  5.                 return 1;
  6.             else
  7.                 return 0;
  8.         }
  9.  
  10.         objs.sort(compare);