function convert24hrTime(hour) {
    switch (hour) {
        case 0:
            return "12AM"
        case 12:
            return "12PM"
        default:
            return `${hour < 12 ? hour : hour - 12}${hour >= 12 ? "PM" : "AM" }`
    }
}
// and figure out a better solution later.
and figure out a better solution later.
and figure out a better solution later .
function convert24hrTime(hour) {
    switch (hour) {
        case 0:
            return "12AM"
        case 12:
            return "12PM"
        default:
            return `${hour < 12 ? hour : hour - 12}${hour >= 12 ? "PM" : "AM" }`
    }
}
function convert24hrTime ( hour ) { switch ( hour ) { case 0 : return "12AM" case 12 : return "12PM" default : return ` ${ hour < 12 ? hour : hour - 12 } ${ hour >= 12 ? "PM" : "AM" } ` } }
and figure out a better solution later.
and figure out a better solution later .