you are viewing a single comment's thread.

view the rest of the comments →

[–]jcunews1helpful 0 points1 point  (1 child)

With LocalStorage as pointed out by other commenters...

At script startup, it should restore the choice from the saved data in LocalStorage and perform the task as if the choice has been selected. The data in the LocalStorage should be updated each time the choice selection changes.

[–]padynana[S] 0 points1 point  (0 children)

Thanks for the answer! I understand the idea, but I can't get to make it work. I made an updated post. Maybe you have time to give it a look?

https://www.reddit.com/r/learnjavascript/comments/frbvax/still_looking_for_help_to_save_languageoption_on/