Questions
you need to add it to Foo's prototype:
function Foo(){} Foo.prototype.bar = function(){} var x = new Foo() x.bar()
~ Answered on 2012-11-23 00:46:41