I would like to be able to iterate through all the members of an object. something like this:
function reflect(obj) {
var str = "";
for (member in obj) { str += (member + "\n"); }
return str;
}
but the Enumerable flag prevents many of the members to apear in the for in loop. my question is:
is there another way to iterate through an object's members that exposes all of them?
if not, is there some access to these flags? (can I set Enumerable to true?)
is there a way to expose the prototype chain and determine which member belongs to which ancestor?