Demo:
Output

Run your code to see the output here...

Use the demo buttons above to test different states