title: jQuery merge() and array.length data type
body: <p>I have been looking through some of the jQuery source and I ran across the <code>merge</code> function.  Here is the source code for it:</p>
  
  <pre><code>function merge(first, second) {
      var l = second.length,
          i = first.length,
          j = 0;
  
      if (typeof l === "number") {
          for (; j &lt; l; j++) {
              first[i++] = second[j];
          }
      } else {
          while (second[j] !== undefined) {
              first[i++] = second[j++];
          }
      }
  
      first.length = i;
  
      return first;
  }
  </code></pre>
  
  <p>While I understand the code, something doesn't make sense to me.  Particularly the <code>if (typeof l === "number")</code> part.  I have tried passing an array to this function when I have manually changed the <code>.length</code> property to something like <code>"3"</code> and checked it's type and I still get a type of <code>number</code>.</p>
  
  <p>My question is when would the <code>length</code> property ever not be a type of <code>number</code> in JavaScript arrays?</p>