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

Function increaseCount

Five Digit Up Counter/script.js:51–71  ·  view source on GitHub ↗
(currentNos, nextNos, index)

Source from the content-addressed store, hash-verified

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

Callers 1

startCounterFunction · 0.70

Calls 1

removeMethod · 0.80

Tested by

no test coverage detected