Create a function that converts dates from one of five string formats:
The return value will be an array formatted like: [MM, DD, YYYY], where MM, DD, and YYYY are all integers. Using the examples above:
convertDate("January 9, 2019") ➞ [1, 9, 2019]
convertDate("Jan 9, 2019") ➞ [1, 9, 2019]
convertDate("01/09/2019") ➞ [1, 9, 2019]
convertDate("01-09-2019") ➞ [1, 9, 2019]
convertDate("01.09.2019") ➞ [1, 9, 2019]
You can solve this any number of ways, but using JavaScript's new Date() method is probably the easiest.