DEV Community

Discussion on: Module pattern in JavaScript

Collapse
 
bayazz profile image
Bayazz • Edited

Hi Tomek,
thanks for the reply.

If we add console.log(timesRun);in the setTimesRun method right after ++timesRun; we can see in the console that timesRun is not 10. But with Formatter.timesRun it's 10.

codesandbox.io/s/lingering-sound-g...