MCPcopy Create free account
hub / github.com/SuperSimpleDev/javascript-course / resetScore

Function resetScore

1-exercise-solutions/lesson-12/12v.js:4–10  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2// we can reuse this code.
3// See 12r.js for the full code.
4function resetScore() {
5 score.wins = 0;
6 score.losses = 0;
7 score.ties = 0;
8 localStorage.removeItem('score');
9 updateScoreElement();
10}
11
12// Add an event listener for the reset score
13// button using .addEventListener

Callers 1

12v.jsFile · 0.70

Calls 1

updateScoreElementFunction · 0.70

Tested by

no test coverage detected