Javascript – Sort list of time strings (e.g. 1 hour, 1 week) by length of time
I have a list of strings that I want to use as duration filter options. They are currently sorted alphabetically but I want them to be sorted by length of time. Is this possible? The strings are: ['1 day', '2…