I have a game where I have redefine keys screen.
When I redefine the keys (press key for left, key for right etc.) they're put into an array and then I loop through that array to set global variables.
But this of course isn't persistent between sessions. What would I do to save and then load that array?
I suppose the answer is localStorage? But I can't work out how it works. Do I need a dictionary? JSON? Something else?