object traversal javascript

JavaScript
for (var prop in obj) {
    obj[prop] = 'xxx';
}

Source

Also in JavaScript: