Traverse through Javascript object properties
<p>I want to traverse through JavaScript object's property</p>

<pre><code>    var obj =
    {
        a: 'value1',
        b: 'value2',
        c: 'value3',
        d: 'value4'
    };

    for (var prop in obj) {
        prop = 'xxx';
    }
</code></pre>

<p>But the above code is not working. Can you help me how to do so ?</p>
