Sorting Javascript Array with Chrome?

The comparer function should return a negative number, positive number, or zero (which is a convention across programming languages).

myArray.sort(function(a, b) {
  return a-b;
});

Full description is here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#description

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)