why can't map 'undefined' array
<p>As title say, why can't I map a array which contain <code>undefined</code> item?</p>

<pre><code>var foo = new Array(3);
// [ , , ]
var bar = [null, null, null];
// [null, null, null]

foo.map(function(val){return 'test'});
// [ , , ]
bar.map(function(val){return 'test'});
// ['test', 'test', 'test']
</code></pre>

<p>maybe the foolish question, but I really want to know the reason.</p>

<p>thanks.</p>