hi I want to sort a native array by a date that I get back from mysql. I want to extend the native array, so I don't have to type the same method over and over again
how can I achieve that?
here's my sorting:
[...].sort((a, b) => {
return new Date(b.timestamp) - new Date(a.timestamp);
});