iterating an object properties
<p>is there a way to iterate an object properties and methods. i need to write a utility function like so:</p>

<pre><code>function iterate(obj)
{
    //print all obj properties     
    //print all obj methods
}
</code></pre>

<p>so running this function:</p>

<pre><code>iterate(String);
</code></pre>

<p>will print:</p>

<pre><code>property: lenght
function: charAt
function: concat...
</code></pre>

<p>any ideas?</p>
