a simple stop watch, with
start
,stop
andreset
functionalities.
the objective of this project is to practice separation of concerns and use setInterval
and stopInterval
APIs
- JavaScript
- HTML5
- CSS3
- VSC code
clone the repo and start using the stop watch.
'use strict';
import { data } from '../data.js';
import updateTime from '../utils/updateTime.js';
import updateTimeComponent from '../components/updateTimeUnits.js';
const startHandler = () => {
if (data.intervalId !== null) {
clearInterval(data.intervalId);
data.intervalId = null;
}
data.intervalId = setInterval(() => {
const time = updateTime();
updateTimeComponent(time);
}, 10);
};
export default startHandler;
List of features ready and Todos for future development
To-do list:
Project is: in progress
By @Samir