-
Notifications
You must be signed in to change notification settings - Fork 75
PTBC1 - Kimmi Lee #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
michelle-mok
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice work organising your code into functions!
what is the purpose of the onClick(event.currentTarget) for all the buttons?
keep up the good work!
| } | ||
| }, 100); | ||
| } | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice work changing button colour on click!
| startButton.classList.add('stopwatch-button'); | ||
| startButton.innerText = 'Start'; | ||
| startButton.addEventListener('click', (event) => { | ||
| onClick(event.currentTarget); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does the onClick do? would your code work without it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the onClick is just to change the colour of the button for 200ms to know that i've clicked on it!
| stopButton.classList.add('stopwatch-button'); | ||
| stopButton.innerText = 'Stop'; | ||
| stopButton.addEventListener('click', (event) => { modeStop = true; | ||
| onClick(event.currentTarget); }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this would be clearer if written like this :
stopButton.addEventListener('click', (event) => {
modeStop = true;
onClick(event.currentTarget);
});
Please fill out the survey before submitting the pull request. Thanks!
🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀
How many hours did you spend on this assignment? 1 (base)
Please fill in one error and/or error message you received while working on this assignment.
Empty argument for addEventListener
What part of the assignment did you spend the most time on?
reset button
Comfort Level (1-5): 3
Completeness Level (1-5): 3
What did you think of this deliverable?
Is there anything in this code that you feel pleased about?