Clientside callback example with .js function throws “cannot read property ‘apply’ of undefined” error

To be more specific, this particular code block doesn’t work because there is a syntax error - an extra } at the end. This is reported in the browser’s dev tools console:


You can remove this sytnax error and it will work.