Create a function that converts 12-hour time to 24-hour time or vice versa. Return the output as a string.
convertTime("12:00 am") ➞ "0:00" convertTime("6:20 pm") ➞ "18:20" convertTime("21:00") ➞ "9:00 pm" convertTime("5:05") ➞ "5:05 am"