Javascript: Is it safe to delete properties on an object being iterated with 'for'
<p>I'm doing something like this:</p>

<pre><code>var myObj = {a:1, b:2, c:3, d:4};

for (var key in myObj){
  if (someCondition){
    delete(myObj[key]);
  }
}
</code></pre>

<p>It works just fine in the samples I've tried, but I'm not sure if it might have an unexpected behavior in certain scenarios/browsers.</p>

<p>Is it ok to modify the object being iterated?</p>
