Skip to content

Latest commit

 

History

History
6 lines (5 loc) · 545 Bytes

114-thinkful-logic-drills-traffic-light.md

File metadata and controls

6 lines (5 loc) · 545 Bytes

Problem:

You're writing code to control your town's traffic lights. You need a function to handle each change from green, to yellow, to red, and then to green again.

Complete the function that takes a string as an argument representing the current state of the light and returns a string representing the state the light should change to.

For example, update_light('green') should return 'yellow'.

Solution