Reputation: 14649
Back in the day, I could do Array.prototype
and it would show me the properties of the prototype member of the Array
object. Even doing console.dir(Array.prototype)
does not work in Node, however, it does work in the browser. Is there a new API that can show me the properties?
Upvotes: 1
Views: 41
Reputation: 5606
This should do it for you. Browser consoles usually have interactive displays for objects. The node repl does not have the same feature, so you have to do the below to get a similar effect.
Object.getOwnPropertyNames(Array.prototype)
Upvotes: 2