cara mengatur ulang array objek berdasarkan tanggal desc di javascript

array.sort(function(a,b){
  // Turn your strings into dates, and then subtract them
  // to get a value that is either negative, positive, or zero.
  return new Date(b.date) - new Date(a.date);
});
Brave Bee