Lights game - easy

Create a mini-game where pressing a button toggles lights.

Requirements:

  • There are 6 lights from A - F and 5 buttons from 1 to 5.
  • By default, the lights should be off.
  • Pressing the following button should toggle the following lights:
    buttonlights
    1B, E
    2B, C, D
    3A, F
    4E
    5A, B, F
    You can use a toggleMap variable provided in the code.
  • If the light is on, add an active class.
  • If the light is off, remove an active class.

You are free to add classes, styles, ids, but don't edit or remove data-test attributes.
Create an account to start coding
Create account