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 :
-
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
-
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
- for
x = x - 1
you can use the shorthandx--;
hope that help and have a nice day
Thank you for your help. I have updated the code.
Have a nice day
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