Assessment In Need For Test Your Skills: Events

Dear sir,
here are my attempts

Task 1 A Pen by Cleo (codepen.io)
Task 2 A Pen by Cleo (codepen.io)
Task 3 A Pen by Cleo (codepen.io)

thanks for your patience, anxiously waiting for your assessment and remarks.

Welcome back, @Cleo_Shepsut.

Great work! Here are some comments:

  • Task 1: :white_check_mark: Correct. I would rather use the class than the button text to change the state. Texts tend to change over time (in bigger projects) and that would break the code. You could test for btn.className === 'on' (and change the className).
  • Task 2: :warning: Mostly correct. “a” and “d” should be switched and also “w” and “s”. This way those buttons behave the same as the cursors keys.
  • Task 3: :white_check_mark: Correct.

Have a nice day,
Michael