Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 21
cookies or local storage var x = localStorage.getItem("x"); localStorage.setItem("x", x++);
19th Apr 2018, 6:08 AM
Toni Isotalo
Toni Isotalo - avatar
+ 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
20th Apr 2018, 12:22 PM
Rafał Glanc
Rafał Glanc - avatar
+ 3
Bhupender Arya This is an unrelated question, so please open a new thread for it.
20th Apr 2018, 1:14 PM
Timon Paßlick
+ 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
21st Apr 2018, 9:44 PM
Richard Cofie
Richard Cofie - avatar
+ 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 !
25th Apr 2018, 4:30 AM
Samuel Gauthier
Samuel Gauthier - avatar
+ 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.
20th Apr 2018, 1:49 PM
Robert Sokolov
Robert Sokolov - avatar
+ 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
22nd Apr 2018, 4:51 AM
Michael55555
Michael55555 - avatar
+ 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.
22nd Apr 2018, 5:53 PM
‎Dael Winograd
‎Dael Winograd - avatar
+ 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.
23rd Apr 2018, 9:38 PM
Nommer101
Nommer101 - avatar
+ 1
A good way would be to store it in a database using php and mysql 😋
24th Apr 2018, 7:51 PM
Samuel Gauthier
Samuel Gauthier - avatar
0
you can set it as a global varibal
21st Apr 2018, 4:51 PM
651291702
0
use local storage or with node you can save to a file.txt .. if all what you need is just saving a counter
26th Jun 2018, 3:43 PM
Adnen Rebai
Adnen Rebai - avatar
- 6
Is C language is the base language or maybe some other languages comes before C?
19th Apr 2018, 4:35 PM
Bhupender Arya
Bhupender Arya - avatar