i want to store value like key and value pair in javascript
So far i am doing like this
var list_of_addressbook_entries = {};
list_of_addressbook_entries.guest_name = name ;
for(key in list_of_addressbook_entries)
{
alert("key " + key
+ " has value "
+ list_of_addressbook_entries[key]);
}
In the above code guest_name is a variable which value is coming from a onclick
so when i am doing the above it showing me the result like
key guest_name has value M
it is not printing the value of guest_name
i want the result like
key guest_name_variable value has key M
Please suggest me what to do here ?