Function is not a function

by Kishore Sahasranaman

JavaScript

function Foo() {}
Foo.prototype = {
    doStuff: function (e) {
        console.log(e);
    }
}
var foo = new Foo();
function Bar() {}
Bar.prototype = {
    doThings: function (e) {
        foo.doStuff(e);
    }
}
var bar = new Bar();
bar.doThings("Test Param"); //foo.doStuff is not a function