I've been working through codeschool.com's tutorial on backbone.js And submitted:
var AppRouter = new Backbone.Router.extend({
//code
});
$(function(){ AppRouter.start() });
and it gave the following error message:
TypeError: 'undefined' is not a function (evaluating 'AppRouter.start()') :28 :14
but adding a single parentheses solved the problem
var AppRouter = new (Backbone.Router.extend({
//code
}));
I feel like it should have still worked before... What was happening when there was one less parentheses?