title: Make a method that edits original array instead of returning a new one?
body: <pre><code>Array.prototype.foo = function() {
      this = [ "random", "static", "replacement" ];
  }
  
  originalArray = [ "this", "was", "here", "first" ];
  
  originalArray.foo();
  
  console.log( originalArray ); // [ "random", "static", "replacement" ];
  </code></pre>
  
  <p>I am wondering how to do the above.</p>
  
  <p>Editing the original array by applying a method to it. So far all I think I can do is:</p>
  
  <pre><code>Array.prototype.foo = function() {
      var arr = [ "random", "static", "replacement" ];
  
      return arr;
  }
  
  originalArray = [ "this", "was", "here", "first" ];
  
  originalArray = originalArray.foo();
  </code></pre>