0

so I wanted to create a HTML/Javascript project which could save little bits of data even after it was closed. I had considered web hosting it on a server, but I didn't think it was worth it.

<script>
    var a = 1
</script>

So, if I had a variable a which equals 1, how would I save that data into cookies so that when I reopen the project, it turns back to 1 instead of resetting to 0 assuming that there is code that resets it? Thanks for your time and effort!

1 Answers1

0

Resolved now. I found out the document.cookie thing.