Help with Backend auto-saving progress

I’ve created a coin clicking game
https://codepen.io/Glaurung/full/qBWmPbZ
and I want the progress to be automatically saved when the user exits the game. When the user comes back to play it, the progress should be the same as when they left.

Can anyone please help me make a function that saves it?

Here is my code:
https://codepen.io/Glaurung/pen/qBWmPbZ

Thanks.

Without any backend or anything, I would suggest looking into local storage for storing data.

1 Like

Okay, so which section of freecodecamp is it in?
Is it the Data visualization one, the Apis and Microservice one, or the Information and security one?