I’m doing the Pomodoro Timer project.
Right now I’m trying to figure out how to fix my code so that when the user stops the timer in the middle, they are still able to resume it with the START button.
In addition, my countdown doesn’t switch back and forth automatically between break time and session time. For instance, if the session time runs out, I need the break time to start automatically and vice versa, until I click STOP. Should I use a loop for that?
I divided my code into 3 parts: data - where the timer data is held, view - where the views are rendered on screen, and octopus - communicates between the views and the data. My timer code resides in the views part. Hope that makes my code a little bit clearer.
Any advice is greatly appreciated! Thank you.
Here is the codepen link of what I have attempted: https://codepen.io/cmtran/pen/Eomzby