title: How do I override inherited methods when using JavaScript ES6/ES2015 subclassing
body: <p>I have created a class that extends Array. I want to execute arbitrary code before calling the inherited push function.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>class newArray extends Array{
        //execute any logic require before pushing value onto array
        this.push(value)    
  }</code></pre>
  </div>
  </div>
  </p>