I think "foo.bar is undefined, not a function" might be clearer.
foo.bar().fiz().buz()
What's undefined, bar, fiz, or buz? Then you have to set a breakpoint to find out. Most people I know try to avoid writing code like this, but Knockout ViewModels are a common place where this bites me. foo = {}
foo.bar()
Or, more commonly, foo = {};
bar = 'bar';
foo[bar]();