Assessments completed for https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Building_blocks/Test_your_skills:_Events#events_2 Seeking feedback
Events 2:
https://jsfiddle.net/kfe7qphc/2/
Events 3:
https://jsfiddle.net/kfe7qphc/
Assessments completed for https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Building_blocks/Test_your_skills:_Events#events_2 Seeking feedback
Events 2:
https://jsfiddle.net/kfe7qphc/2/
Events 3:
https://jsfiddle.net/kfe7qphc/
Hi @meg_hidey and welcome to the community
Well done! Here are my comments:
You could make the case
s simpler by negating the conditions and putting the x/y change inside. For example:
if (x > 50) {
x -= 1;
}
Since drawCircle(x, y, size);
is called in every case
we can move it to out of the switch
.
The click should color the buttonBar
and not just the button. Otherwise your code is correct.
I hope that helps.
Michael