iterating an object properties

javascript

Solution

See my answer in this other question, but you can't read built-in properties like that.

Problem

is there a way to iterate an object properties and methods. i need to write a utility function like so: ``` function iterate(obj) { //print all obj properties //print all obj methods } ``` so running this function: ``` iterate(String); ``` will print: ``` property: lenght function: charAt function: concat... ``` any ideas?

Original source

Related problems