Detrimental Javascript Tricks
<p>What are some of the most detrimental Javascript tricks?  Pleas include the <strong>"issue seen"</strong> and "<strong>avoid by</strong>" blocks.  </p>

<p>Examples:</p>

<ol>
<li><p>Adding properties to <code>Object.prototype.prop = 1</code><br>
<strong>Issue seen</strong>: <code>for(var i in obj){ alert(i);}</code><br>
<strong>Avoid by</strong>: using <code>hasOwnProperty</code><br>
example:<br>
<code>for(var in in obj)if(obj.hasOwnProperty(i)){alert(i);}</code>  </p></li>
<li><p>Override <code>Number.prototype.valueOf = function(){return Math.random()}</code><br>
<strong>Issue seen</strong>: <code>4*3</code> (Depends on Javascript engine)<br>
<strong>Avoid by</strong>:  <code>delete Number.prototype.valueof</code> (again depends on Javascript engine)</p></li>
</ol>

<p>Please include potential solutions if you can't think of a way to "<strong>avoid</strong>" the code.</p>
