title: Custom array object
body: <p>I'm new to prototyping and instantiations and therefore had a question :</p>
  
  <ul>
  <li>How can I create a function that constructs a new array that also has some properties added with prototype but without modifying the default Array function ?</li>
  </ul>
  
  <p>For example :</p>
  
  <pre><code>function Cool_Object() {
      this = new Array() // Construct new array.
      //This is only for the example. I know you can't do that.
  }
  Cool_Object.prototype.my_method = function() {
      // Some method added
  };
  </code></pre>
  
  <p>So, if you call :</p>
  
  <pre><code>var myObject = new Cool_Object();
  </code></pre>
  
  <p>myObject would be an array and have a method called "<code>my_method</code>" (which actually calls a function).</p>
  
  <p>But the default Array object would be intact.</p>
  
  <p>Thanks in advance !</p>