+ 21
cookies or local storage
var x = localStorage.getItem("x");
localStorage.setItem("x", x++);
+ 5
localstorage is good to save simple things like webpage settings. To save game progress or other important data u need some sort of database. try firebase. it's fast and simple
+ 3
Bhupender Arya This is an unrelated question, so please open a new thread for it.
+ 2
local and session storage -as far as I know and I've tested- does not work on sololearn. Of course in a real website, it will work, or use php to store it
+ 2
Bhupender, C is an old language but there is languages way older than C lile Asm, BASIC, Fortran, COBOL, B language and many others !
+ 1
Variable values are stored as temporary memory which exist only during the execution of your code. When you exit your code that memory is gone, so in order to save it you need to write it on disk or local storage and then load it on the next execution of the code.
+ 1
PhoenixSL You need to store it in a database first I would do it with the firebase. But the problem is that you will have to authenticate everyone first to store it for each unique user
+ 1
Send it to another page in the ending of the program. When you start the program, ask this page for the value you saved.
+ 1
websql for chrome
index db for firefox, chrome
local storage for firfox, chrome
session storage for firefox, chrome
cookies for best support
everyone that tracks you google, facebook, microsoft, advertizement companies are using cookies to track your movements across the web. you can block cookies but by default it is on.
Shopping sites use cookies to keep track of which items you put in your cart thats why you don't have to register to buy things.
+ 1
A good way would be to store it in a database using php and mysql đ
0
you can set it as a global varibal
0
use local storage or with node you can save to a file.txt
.. if all what you need is just saving a counter
- 6
Is C language is the base language or maybe some other languages comes before C?