So the issue can be seen in the picture bellow. I have added the functions to the prototype via
for (var i in memberFunctions) {
classFun.prototype[i] = memberFunctions[i];
}
which gets executed before the function call. What confuses me most is why is the function visible in the Dev Tools but undefined when called?
How do I add these functions after the function is defined so that they can be called later?