I'm trying to find if it is possible to override derived functions in JavaScript. Let's say I have a function like this.

```
function Filter(applyCallback) {
    filterController = this;

    FilterValues = {};
}

Filter.prototype = {
   constructor: Filter,
   Reset: function() {
      FilterValues = {};
   }
}

function SearchFilter(applyCallback) {
   Filter.call(this, applyCallback);
}

SearchFilter.prototype = Object.create(Filter.prototype);

SearchFilter.prototype.constructor = SearchFilter;

/// When doing this I believe i override the entire base.Reset function
SearchFilter.prototype.Reset = function() {
   /// Call Filter.Reset()
   base.Reset();

   /// Do SearchFilter.Reset things
   FilterValues.search= "default search string";
}

```

If the code isn't clear: What I want to achieve is an upper level filter controller, which will contain all generic logic such as reset and apply, and derive from that filter controller to create more specific filter controllers which contains logic for all different filter types etc. I want to preserve the generic filter controllers behaviours.

One solution I can think of is this:

```
function Filter(applyCallback) {
    filterController = this;

    FilterValues = {};
}

Filter.prototype = {
   constructor: Filter,
   Reset: function() {
      FilterValues = {};

      if(resetFunction !== null)
         resetFunction(); /// Parent calls its unknown children, ugh..
   }
}

function SearchFilter(applyCallback) {
   Filter.call(this, applyCallback);

   resetFunction = function() {
      /// Do SearchFilter.Reset things
      FilterValues.search= "default search string";
   };
}

SearchFilter.prototype = Object.create(Filter.prototype);

SearchFilter.prototype.constructor = SearchFilter;

```

Or the other way around:

```
function Filter(applyCallback) {
    filterController = this;

    FilterValues = {};

    resetFunction = function() {
       FilterValues = {};
    };
}

Filter.prototype = {
   constructor: Filter
}

function SearchFilter(applyCallback) {
   Filter.call(this, applyCallback);
}

SearchFilter.prototype = Object.create(Filter.prototype);

SearchFilter.prototype = { 
   constructor: SearchFilter,
   Reset: function() {
      if(resetFunction !== null)
         resetFunction(); /// Invoke the generics filter reset

      FilterValues.search = "default search string";
   }
}

```

In my opinion, best practice would be to have c# equivalent of base.Function(), but as I am comlpetely new to JavaScript I'm not sure if that is possible (I bet it isn't). Anyways, do anyone have any thoughts regarding this? What is the best practice and so on.

Thanks in advance!