Build an Auto-Rotating Traffic Light in Vanilla JavaScript

Prompt: Build an Auto-Rotating Traffic Light in Vanilla JavaScript

Do not use React, Vue, jQuery, or any third-party framework/library. Implement a traffic-light component using only HTML, CSS, an...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: