Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi,
I am writing a javascript for entering the form( name, ssn#, ph#, age).
Once i enter these entries i want to store them in any data structure.
How could I do this under java script?
Any help will be greatly appreciated.
Thanks.

Do you really mean javascript? People don't usually talk about "data structures" with javascript. You probably mean Java. The two aren't really even related, except maybe some syntax in common.
Please attempt all homework assignments before posting them here, and ask a specific question (ie not "how do I do my homework?")
-SN

There isn't really a data structure type per se, but you can create your own Javascript objects, which are essentially data structures of sorts.
Explaining how to do objects would take too much room for this post, so you'll have to search the 'Net for info on that. But to start you off, here are a few:
http://www.ncat.edu/~esterlin/c322s02/Notes/javascriptDataStructs.pdf
http://home.cogeco.ca/~ve3ll/jstutorc.htm?reload_coolmenus
Hope this helps a little...
D.O

Thank you Cha-to for giving me link to the material which help me to understand how can I store data using any data structure in javascripting.
And SN, I know what I'm asking for and I do my Home work before I post them. Anyways, thank you for taking time to write those comments.

priti-
Just making sure...A lot of people post asking for javascript when they mean java...I have difficulty imagining a purpose for storing name, ss#, phone, and age in a javascript data structure, so you'll forgive my suspicion.Anyhow, an array is a data structure, so I would just store them all in an array, rather than actually defining a javascript object. That would be your easiest route.
array1=new array("SN","555-5555","25","353-234-1524");
Good luck,
-SN

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |