I am trying to set items in localStorage to a number, and change the by a set amount often.
I found online that setting the localStorage item to a variable works with localStorage.setItem("savedCookies", Cookiesvar.toString())
and this works to set the localStorage to a number but once you refresh it is reset because the variable Cookiesvar gets reset, resulting in savedCookies to be reset. Is there a way of fixing this or should I just completely change the method?