MCPcopy Create free account
hub / github.com/freeCodeCamp/freeCodeCamp / incrementCurrentCount

Function incrementCurrentCount

client/src/utils/session-storage.ts:12–15  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10const getSavedCount = () => parseCount(sessionStorage.getItem(SAVED_COUNT_KEY));
11
12export const incrementCurrentCount = () => {
13 const newCount = getCurrentCount() + 1;
14 sessionStorage.setItem(CURRENT_COUNT_KEY, newCount.toString());
15};
16
17/**
18 * Saves the current count so we can compare it later.

Callers 1

Calls 1

getCurrentCountFunction · 0.85

Tested by

no test coverage detected