/* very fucking weird! */ function retFunction(foo) { return function bar() { console.log(foo); } } var foo = new retFunction('hello, world!'); foo.call(foo); /* call the bar() with no args in foo object */