title: Can I create my own array object in JavaScript?
body: <p>I have created a JavaScript application that has a lot of array manipulations (sorting, filtering, etc.).</p>
  
  <p>Currently my functions are like this:</p>
  
  <pre><code>function (myArray, arg1, arg2,...)
  </code></pre>
  
  <p>where myArray is the array I am working on, and arg1, arg2,... are the arguments used by the function to modify the array.</p>
  
  <p>I am thinking that it would be neater to have a clear separation between the object and the arguments (a la jQuery):</p>
  
  <pre><code>myArray.function(arg1, arg2,...)
  </code></pre>
  
  <p>I know that I could use Array.prototype to add my function to all arrays, but this seems too heavy as the functions I add are really specific to my case and don't make sense on arrays in general. I also know that I could create an object, but then I wouldn't benefit from the array methods available in JavaScript (indexOf, filter, etc.).</p>
  
  <p>Is there a way I could create my own array object, that would inherit the default array methods and allow me to add my own? </p>