MCPcopy Create free account
hub / github.com/codemistic/Web-Development / increaseCount

Function increaseCount

5-digit-counter/script.js:50–70  ·  view source on GitHub ↗
(currentNos, nextNos, index)

Source from the content-addressed store, hash-verified

48
49
50function increaseCount(currentNos, nextNos, index) {
51
52 let current = currentNos[index];
53 let next = nextNos[index];
54
55 if (current.innerText == 9) {
56 increaseCount(currentNos, nextNos, index - 1);
57 }
58
59 next.classList.add("animate");
60
61 setTimeout(function () {
62 current.innerText = next.innerText;
63 next.classList.remove("animate");
64 next.innerText = parseInt(next.innerText) + 1;
65 if (next.innerText > 9) {
66 next.innerText = 0;
67 }
68 }, 500);
69
70}

Callers 1

startCounterFunction · 0.70

Calls 1

removeMethod · 0.80

Tested by

no test coverage detected