DEV Community

Discussion on: How to build a stopwatch with HTML, CSS, and plain JavaScript (Part 2)

Collapse
 
habeebullahi01 profile image
Habeebullahi01

Thanks for the tutorial Omar. I had a great time coding the stopwatch. It was really fun. I did it from scratch and made a few changes and modifications to the code. I added a reset button and a lap recording functionality.
I'll add the link to the github repo and a live site. Please look through it if you can. I'll be glad to learn where I used a bad practice, resources that can help, or anything of that sort.
Repo:
github.com/Habeebullahi01/Stopwatch
Live site:
stopwatch.vercel.app/

Collapse
 
bnsddk profile image
Omar

Hi Habeebullahi! Glad you enjoyed the article and had fun creating another version.

Overall it looks good, but I would suggest changing the icon colors from black to white (or another color that contrasts better with the background and thus more visible and accessible).

Also, for the lap button icon, perhaps it would be better if it matches with the other icons, so there's consistency.

I had a quick look at the code, I think a code formatter like Prettier (you can download it directly from VSCode if you're using it), will help you format your code to be easier to read. E.g. alignment of the attached image.

And in the README of the GitHub Repo, I would suggest adding an image/GIF, and also a link to the live site you shared with me.

That aside it looks great. 💪🏽

Feel free to follow twitter.com/tinloof if you want to keep up to do date with some tips and tutorials. 🙏🏼

Collapse
 
habeebullahi01 profile image
Habeebullahi01

I'll definitely go through the project and make the necessary changes as soon as I can. Thanks again, I'm very grateful.

Thread Thread
 
bnsddk profile image
Omar

Pleasure!

Collapse
 
bnsddk profile image
Omar

Hi Habeebullahi,
I just made a slight change in the JavaScript.
I removed formatTwoDigits function and replaced it by padStart(), I suggest you have a look.

Collapse
 
habeebullahi01 profile image
Habeebullahi01 • Edited

I'll definitely check it out.🤗 Thanks for the update. I have also made the changes you suggested for my version, except the code formatting. I haven't been able to get around to doing it yet. I'm using Atom and when I searched for it, it didn't return any results.