Need Help with test case 8 in POMODORO Clock project

Hi fellow campers,

I am stuck with test case 8 on Pomodoro clock project
Here is my code: https://codepen.io/Ahmedelbessfy/pen/dxJzJG

I need anyone to tell how it works to know how to pass.
Any help appreciated.

I already answered here which also applies to your problem.
You basically need to take all of your variables used, to reset to initial values and update dom with them.

1 Like

Sorry, I don’t understand what do you mean. Have you looked at the code?

And concerning your answer in the other post, my code works properly in this part which pauses and continue from where it was paused

mm:ss problem? If you calculating minutes and seconds separately it should be easy. Check if minutes are two digit number(easiest is to turn them into string for checking purposes) i.e. if minutes are “9”, so length is 1, add “0” in front of it. Same goes for seconds.

Edit1:
If your time variable is already containing mins and sec, the use this example:

var time= "x:xx";
var res = str.split(":");

In res you now got two array members,a res[0] is "x" and res[1] is "xx". Now you can do checking event if it’s been together before.

1 Like

Checked and all goes well but not passed yet!!

Well, I figured it out and I think user stories needs update. When clicking on session-decrement or increment elements, both session-length and time-left elements content must be updated not only the session-length content

There is user story for this.