Javascript new Array and join() method
<p>Inspired by <a href="https://www.destroyallsoftware.com/talks/wat" rel="nofollow">this popular speech</a> I wanted to figure out some issue related to creating arrays. Let's say I am creating new array with:</p>

<p><code>Array(3)</code></p>

<p>In console I am getting:</p>

<p><code>[undefined, undefined, undefined]</code></p>

<p>Which is pretty obvious. Let's say I am doing joining on that array:</p>

<p><code>Array(3).join()</code></p>

<p>As a response I am getting:</p>

<p><code>",,"</code></p>

<p>Which is pretty understandable as well, because these are three empty strings, separated by commas, I suppose. But when I am trying to do:</p>

<p><code>Array(3).join("lorem")</code></p>

<p>I am getting string with only two repeat of ”lorem”:</p>

<p><code>"loremlorem"</code></p>

<p>Why there are two, not three repeats of that word?</p>
