I am learning Backbone and had some problems with the on () function. But this is actually a very simple JavaScript question.
Why does the first line of code below work and the second not? Using the second line, the rendering function never starts. Pay attention to the brackets.
Work
this.collection.on( 'reset', this.render, this );
Fails
this.collection.on( 'reset', this.render(), this );
Voles source
share