title: JavaScript: is extending prototype dynamically a bad practice?
body: <p>I want to know if extending a Function's prototype dynamically is a bad practice. I'm considering to do this using a static method that receives the property name and the function to add to the prototype.</p>
  
  <p>Is that a bad practice?</p>
  
  <pre><code>function Test() {
      this.condition = false;
  }
  
  Test.extend = function(id, task) {
      this.prototype[id] = function() {
          return task.apply(this, arguments);
      };
  };
  </code></pre>