title: Prototype function polluting JavaScript array
body: <p>I'm working with an API that can accept multiple arrays in which I'm using <code>apply()</code> to pass the arrays, but the array contains a prototype function that I cannot seem to remove from the individual array.  What ends up happening is that prototype function being executed.</p>
  
  <p>This is the prototype function:
      <code>if ( !Array.prototype.last ) { Array.prototype.last = function(){ return this[this.length - 1]; }}</code></p>
  
  <p>For example when I log each array I see the following in my eventList array:</p>
  
  <pre><code>["name1", "index1", "value1", last: function]
  ["name2", "index2", "value2", last: function]
  ["name3", "index3", "value3", last: function]
  </code></pre>
  
  <p>I then push the arrays:</p>
  
  <pre><code>apiName.push.apply( apiName, eventList );
  </code></pre>
  
  <p>I've tried <code>array.pop()</code> to remove the 'last' function on each array, but to no avail.</p>
  
  <p>How does the prototype function end up in the array in the first place and how would I prevent it from being called in the apply()?</p>
  
  <p>Thanks for any insight!</p>