`hour < 12 ? "AM" : "PM"` would be right... 0-1...
# javascript
t
hour < 12 ? "AM" : "PM"
would be right... 0-11 is am, 12-23 is pm. Assuming that the value in hour is a number from 0-24...