25 + 5 clock , I'm stuck?

Hi all :slight_smile:

I’m not sure if I’m doing this correctly or not?
From what I read what I have so far should be correct? But user stories 12-15 are not passing. I haven’t solved the earlier ones, but I think these should pass at this stage? I just want to have an idea about what’s wrong then before I add more and more code.

Plus I’m getting some strange errors after running the test:

Uncaught TypeError: Cannot read property ‘disconnect’ of undefined
at bundle.js:657
Uncaught Error: Script error. (:0)
at a.onerror (bundle.js:593)

Any insight would be great. Thanks! :slight_smile:

my codepen, it’s very crude at this point so ignore that:


I haven’t been able to replicate TypeError of ‘disconnect’ that you received, but I am having tests fail to pass. Right now, with your code, I can only get 8/29 tests to pass, and that’s just running the tests once. After running it again without refreshing, I get only 6/29 tests to pass.

I’d recommend running the tests with the “Select Test Suite” tool in your page (top-left of the view) and checking the errors to see what is actually output on each test vs what is expected on each output. Iterate through those one step at a time to find the errors in your code.

Thanks for the reply.:slight_smile:
I’ve not tried to solve all the challenges of this project, I was just wondering why tests 12-15 won’t pass, even though the values for session and break length increment/decrement by one ? I was thinking if there’s some error now, I don’t want to bury it under more code?


hello, in case you have on the screen session time (25:00 by default) you can change that time by pressing increment/decrement buttons, however at the same time you can increase/decrease breaktime but time on the screen will not change, you might check the provided example what is required. :slightly_smiling_face:

Thanks. So I really should solve the earlier user stories before worrying about user stories 12 and on? :slight_smile:

I would probably check how the FCC clock is working :wink:

Hi somebody ,
I’m stuck again .

My new codepen :


These lines of code from line 116:

defaultState.timerSS = --defaultState.timeis60;
 let update = {
         timerSS:  ':' + defaultState.timerSS ,
          timerMM:  --defaultState.timerMM  

I want timerSS to update to 59 and then decrement with every iteration from the setInterval (line 140).
but it’s off course not working. It decrements to 59 and that’s it, doesn’t loop any further.

But if I change the above code to this:

let update = {
          timerSS:  ':' + --defaultState.timeis60 ,
          timerMM:  --defaultState.timerMM  

then timerSS just stays 0 and the loop works.

How do I fix this?

Just to add, this code is in default now, but I plan to change that later to when play is pressed. This is just to test the code.

Hope someone can help! :slight_smile:

I’m hoping someone can help :slight_smile:
playpause in the reducer is not looping when the play/pause button is pressed with setInterval. It loops once , and then every time I click the play/pause button , the value is decreased, but it should be called repeatedly automaticaly with the setInterval ?

Hope someone is willing to take a look :slight_smile: