I\'m just learning about how to best organize my javascript code, and I had a question regarding this small piece of code I wrote:
var reportsControllerIndex = {
You want to store the this binding in a variable.
this
drawMap: function() { var _this = this; $.getJSON('/reports.json', function(data) { _this.plotMapPoints(data); }); }