Overriding an existing MV function?

I can't remember if this is a basic javascript thing, or whatever, but I need to know how to override a default MV function. Any help would be appreciated!
You can simply assign a new method to it:

Code:
ClassName.prototype.methodName = function() {
  console.log('This is the original method');
};

var oldMethod = ClassName.prototype.methodName;
ClassName.prototype.methodName = function() {
  //Calls the old method.
  oldMethod.call(this);
  console.log('This is the replaced method');
};
Oh, nice, it really is that easy. Looks like I was making an error elsewhere in my code, but it's working now. Thanks for the help!

Original thread: https://forums.rpgmakerweb.com/threads/overriding-an-existing-mv-function.56196/