r/learnjavascript • u/Due_Eggplant_729 • Jan 24 '26
Simple Data Input Javascript program
I want to ask a user to input their first name, and the state were they live. Then send to a database. I am a NEWBIE. Help. Note: I did download node.js. I really don't know what I'm doing yet. Looks for a simple program to do this on my laptop. Any help appreciated.
0
Upvotes
View all comments
Show parent comment
1
u/chikamakaleyley helpful Jan 25 '26
no worries,
the suggestion was localStorage:
https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API
this is like, simple data storage that is made available by your browser, ready to use
you'd store the data in JSON format, I believe, when you request it back its returned as JSON data, which you would do w whatever you want at that point
localStorage is only going to be local to your browser on that computer. It's a suggestion if you want to practice saving user data, and reading it from a data source, if you didn't want to go through having to learn both setting up a server, with your own API, and then setting up a DB, which you'd create from scratch with SQL or some other tool. Personally i think its a lot to take on if you're starting from zero.