This is an assignment from The Odin Project. Unfortunately, although this is a pairing project, I did this project by myself.
Pomodoro clock is a famous technique for time management: concentrate in 25 minutes, break in 5 minutes, and keep doing this cycle as long as you can.
Above is traditional intervals, you can adjust your own appropriate intervals by using the "<" and ">" buttons. When you are ready, you can click the play button to start. Indeed, you can pause the timer by clicking the pause button and reset it by clicking square one. Finally, you can always click the loop-like button to restore to the traditional intervals.
Remember: when you start an interval, it will run infinitely until you click the pause or reset buttons. You will notice the red color when you are running out of time.
The main purpose of this project is paring programming but I could not find any partner at that time.
I implemented quite complicated logic just for counting a clock. The main logic here is to display the time in string format "mm:ss". I tried to use my own idea and not to depend on predefined functions. I should have chosen different appropriate data structures and some helper functions for simplified and maintainable code.
Except for those parts, the project helped me consolidate Javascript as well as use the Document Object Model fluently.
A screenshot of pomodoro-clock.
You can view Courgette's pomodoro-clock in a browser.