Assessment wanted for Events 2 skill test//

Hello, I finished an exercise and was wondering if someone could give feedback. Thank you.

Hello @brusli

you doing great just a few notice here :

  1. you do not need to add 4 event listener you need only one and check in this event if the key was W/a/s/d and react based on it

  2. the function drawCircle does not return any thing so no need for that
    let newCircle = drawCircle(x, y, size);
    the drawCircle just draw it based on the x and y and size value nothing else matter

it even over write what been drawn earlier
so just use/call the drawCircle with the new value

  1. for x = x - 1 you can use the shorthand x--;

hope that help and have a nice day :slight_smile:

1 Like

Thank you for your help. I have updated the code.
Have a nice day :slight_smile:

Hello @brusli

that much better

by the way you do not need to return return drawCircle(x,y,size); anything just call drawCircle(x,y,size);
and you call use switch statement instead of the if else

and have a nice day :slight_smile: