JavaScript -What's with the #2 in this program
<p>According to the tutorial I am reading, the program below displays "Hello Ima Reader."</p>

<p>I have one question about this program. Why does it, in its final line, insert a "2" into <code>alert(name[2])</code>?</p>

<p>When the function is called in the second last line, it only passes "name", but when the alert is run it uses a "2". I'm assuming that 2 refers to the length of name, but is it necessary? If so, Why?</p>

<pre><code>function makeHello(name) {
   name[name.length] = "Hello" + name [0] + " " + name[1];
}

var name = new Array ('Ima', 'Reader');
makeHello(name);
alert(name[2]); 
</code></pre>
