If I have an array of objects with properties and I wanted to sort the objects by a specific property, how would I be able to do this? For example, let’s say that I had a bunch of news objects each with a date property.
How would I be able to sort each of the objects in javascript by date?
If your array is arr: