title: Javascript result is the function as a string not the array element I was expecting
body: <p>my JavaScript object has an array in it but when I try to return an element of the array I get the function as a string instead of the value of the array element.</p>
  <p>My code is</p>
  <pre><code>  function Car(make, model){
      this.make = make;
      this.model = model;
      this.dimensions = [4, 3, 1.8];
      this.carLength = function(){ return this.dimensions[0]; };
    }
  
    var c = new Car(&quot;Ford&quot;, &quot;Escort&quot;);
  
    alert(c.make);
    alert(c.model);
    alert(c.dimensions[0]);
    alert(c.carLength);
  </code></pre>
  <p>The first 3 alerts show the data expected, (&quot;Ford&quot;, &quot;Escort&quot; and 4), the forth one displays the following output</p>
  <pre><code>function(){ return this.dimensions[0]; }
  </code></pre>
  <p>Why is the function being listed and not executed?</p>