Last Updated: February 25, 2016
·
491
· asaayers

Use _.bind() for simple callbacks.

Need to create a callback that simply calls another function?

var callback = function() { 
    return model.get('comment');
} 

The following code gives you the same result:

var callback = _.bind(model.get, model, 'comment'),