sort array by date typescript - Google Search

PHOTO EMBED

Mon Nov 16 2020 14:22:51 GMT+0000 (Coordinated Universal Time)

Saved by @ali_alaraby #typescript

array.sort((x, y) => +new Date(x.createdAt) - +new Date(y.createdAt));
content_copyCOPY

https://www.google.com/search?q