Traffic Light (Vanilla JS)

Build a traffic light with three lights and buttons to show a random light, cycle through them on a timer, and stop.

Asked in frontend interviews at Spotify, Uber and LinkedIn