You need to declare the function testChild() before you set its prototype. Then you need to call testChild.test to call the method. I believe you want to set testChild.prototype.test = test, then you can call testChild.test('hi') and it should resolve properly.