I have an object called a
that I use nearly all the time.
Then 'b' comes along being awkward and I need to do some other things before calling notify.
What is the best functional/prototypical approach to take get the same thing has called the parent in object-oriented (Which I understand to not be possible without using Javascript classes - correct me if I'm wrong)
let a = {};
a.notify = () => {
doSomethingCool();
}
var b = Object.create(a);
b.notify = () => {
doCoolStuffFirst();
doSomethingCool();
}