As a developer do you ever wonder what you should create next, and nothing comes to mind?
In this situation I looked at my iPhone, opened the clock and saw the stopwatch. This is so simple to create in JavaScript, but a low complexity problem can also be nice to code every once in awhile. I wanted this timer to be more precise than normal examples that uses setInterval to record the duration. Although I did use setInterval to calculate the current duration to print it to the screen, this is not updating the duration like most examples on the internet.
Modules in vanilla JavaScript is new to me. Although I have used it before within node.js, I didn’t realize this existed in vanilla and had an excuse to call it from the main index.html file.
I hope you enjoy my approach to this basic problem. https://github.com/jkken502/stopwatch https://jkken502.github.io/stopwatch/
Please note:
This is past dated, because this is the date the project was originally created, not when the project was uploaded to GitHub.