Ask coding questions

← Back to all posts
Ok this is complicated How would I make a save for this via gmail or local save
LukeShomper (26)

I need this because It's a clicker and It's no fun having to restart so I'm just asking. Thanks!

Answered by Vandesm14 (2010) [earned 5 cycles]
View Answer
Commentshotnewtop
Vandesm14 (2010)

You can use local storage for that:
Set an item: localStorage.setItem('score', 300);
Get an item: localStorage.getItem('score');

Vandesm14 (2010)

@LukeShomper Please mark my comment as the answer if I resolved your issue 👍

mwilki7 (768)

Not the best idea, but way I did something like this is to turn your game state into text and copy paste that manually into a file somewhere.