Answers for "how to sort by time in js"

13

javascript order array by date

const sortedActivities = activities.sort((a, b) => b.date - a.date)
Posted by: Guest on April-16-2020
0

array map order by timestamp reactjs

const sortedActivities = activities.slice().sort((a, b) => b.date - a.date)
Posted by: Guest on December-15-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language