how to pass context through callback code example
Example 1: javascript pass this to callback
makeHTTPRequest('GET', 'http://youramazingapi/money_makers.php').then(function(data){
this.shakeThose.push(data);
}.bind(this));
Example 2: javascript pass iterator to callback
for (var i = 0; i < a.length; i++) (function(i)
{
//some function here
}) (i);