How to remove undefined values from array but keep 0 and null
<p>In javascript, I want to remove undefined values, but keep the values 0 and null from an array. </p>

<pre><code>[ 1, 2, 3, undefined, 0, null ]
</code></pre>

<p>How can I do it cleanly?</p>