Possible Duplicate:
How do I enumerate the properties of a javascript object?
Good day!
I want to determine all the properties of my navigator using javascript by doing this following code:
<script type="text/javascript">
for(var property in navigator){
str="navigator."+ property; //HAVING A PROBLEM HERE...
document.write(property+ " <em>"+
str+"</em><br />");
}
</script>
But the concatenation of my str variable prints as it is. What i need is the actual value of the property.
eg. navigator.appCodeName should print mozilla instead of navigator.appCodeName itself.
Thank you in advance.