Storing Values in Local Storage

I would love if we can save a variable value on user’s phone so when they open the filter again , the previous records are still saved.
This can be really helpful for high-score games or continue where they left.
It has a lot of potential !!