I have a array of these date Times. They are provided as strings. I need to be able to isolate the min dateTime and the max dateTime of the provided array but I am having trouble figuring out how I can do this? Is it possible to feed each string to -> new Date(dateTime) and then compare the two objects that way? Or do I have to parse then compare the date and compare time separately?
example values:
4: "2018-11-15 00:16"
5: "2018-11-15 00:52"
6: "2018-11-15 02:24"
7: "2018-11-15 03:02"
8: "2018-11-15 02:49"
9: "2018-11-15 00:14"
10: "2018-11-15 02:20"
In this example I would need to isolate 9 as the min and 7 as the max value in the array