list an object's properties

H

Herb

how can I do that? I simply want to create a function which will list all
properties of any object which is supplied as an argument to the function
 
H

Herb

please disregard. After searching for 25 minutes, I found the answer 1
minute after posting my question. C'est la vie. <sigh>
 
M

Mister Joe

how can I do that? I simply want to create a function which will list all
properties of any object which is supplied as an argument to the function


var o = {}
for(att in o){
alert(o[att]);
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,001
Messages
2,570,254
Members
46,850
Latest member
VMRKlaus8

Latest Threads

Top