Answers for "sort array by date moment"

0

sort array by date moment

let sortedDates = dates.sort(function(a, b){
  return moment(b).format('X')-moment(a).format('X')
});
Posted by: Guest on August-14-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language