sort by date time is not working js code example Example: javascript order array by date const sortedActivities = activities.sort((a, b) => b.date - a.date)