dir

Equivalent of Python's dir in Javascript

Equivalent of Python's dir in Javascript Question: when I write Python code from the interpreter I can type dir() to have a list of names defined in the current scope. How can achieve to have the same information, programmatically, when I develop Javascript code from a browser using an interactive console like firebug, chrome console, …

Total answers: 9

Why is 'dir()' named 'dir' in python?

Why is 'dir()' named 'dir' in python? Question: In Python there is a built-in function called dir. This is used to get a list of all the attributes for an object. I understand what it does, but I am confused about why it is called dir. How is this name related to getting the attributes …

Total answers: 4