Querying Object Properties/Methods?

I’ve been trying to find some sort of reference to tell me what information I ought to be able to find out about any object - built-in metadata I suppose you could call it.

For example, I know I can query a variable with typeof, and get told whether it’s a string, or an array, or object and so on, just by knowing its name. I could also query with something like [object name].length and get some sort of response back.

It strikes me though that I ought to be able to query other aspects of an object; what properties it has available to it, their currently assigned values (easy enough to do once you know what properties are available), or the names of its methods, and possibly other things too.

Is there a reference to this that anyone knows of?

Looking for Object.getOwnPropertyNames() and related ??

1 Like

That’s the kind of thing. Its parent page looks useful too. Guess my search terms were a little suspect.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.