What value to use to clear out different data types?
<p>Say you have a property that has a value and you want to clear out that value.  Do you always want to set it to null or undefined, or does the data type matter.</p>

<p>The only reason I could think that the data type would matter would be for documentation purpose of what this property's data type should be.</p>

<p>Example of what I am talking about:</p>

<pre><code>var x = "string";
x = ""; // clear the value with the implied data type
// or
x = null; /* or */ x = undefined;
</code></pre>

<p>Same could be applied to Numbers(NaN), Arrays([]), Objects({}) where it would be cleared with the empty datatype equivalent.</p>

<p>I am mostly looking for what the best practice would be and why, not what is possible.</p>
