Pomodoro clock pausing and unpausing

Pomodoro clock pausing and unpausing
0

#1

I need help pausing and unpausing my timer. When i click the circle. here is my code pen.https://codepen.io/siddarthk/pen/ZJRzVQ?editors=1111


#2

Looked at your code briefly , this may not fully fix your problem but it is a start in the right direction, this is your onclick function to pause the timer

       c.onclick = function(e){
       if(paused == "false"){
         clearInterval(timex)
       }
         
        else if(paused == "true"){
        startTimer()
        paused = false
        
      }
         
     }

2 main points that are wrong with this is, one, if you are giving the variable paused a boolean assignemnt of true and then in the next line you are checking for a string for the same variable , i.e. you are checking if paused ='true' , meaning if you are looking for a string true and not the boolean true then it will not work. You are doing this all over your code page so I would be consistent and mark all your boolean variables strictly as boolean. (true or false not "true" or "false"
The second problem is that once the user clicks to pause the clock, you forgot to set paused back to true.

Like I said, these may not fully fix your issues but it is a good start