Pomodoro Clock. Any feedback

Pomodoro Clock. Any feedback
0

#1

Hello,
I just finished my Pomodoro Clock.
Hard work as well but after the JavaScript calculator I am getting used to translate a problem into a flow of code.
Any feedback welcome

Pomodoro Clock


#2

Congrats on nearly having another coding challenge finished!

Overall, your clock works.

Here are some things to consider:

  1. You may want to make it obvious where users have to click to start and pause the clock

  2. You may wish to add a reset button, so the user can reset the time.

  3. When the timer gets to single digits it displays :7 instead of :07

  4. It looks like you code is throwing an error to the console when paused Uncaught RangeError: Maximum call stack size exceeded


#3

Hello,

Many thanks for the feedback. I really apreciate.

Regarding the first two points I do some styling to show up the clock and the bottons for resetting session and break.

Regarding the digits I applied the method _toLocaleString_to format seconds with two digits always.

And for the last point, the error in the code came from using one function for session and another for break and calling each other. So, instead, I set a single function for both and add up a boolean global variable more.So, within the same function I switch session and break with that boolean.