Answers for "sort array by date typescript"

2

sort array by date typescript

array.sort((x, y) => +new Date(x.createdAt) - +new Date(y.createdAt));
Posted by: Guest on November-16-2020

Code answers related to "sort array by date typescript"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language