I’m using the JS library Underscore and in particular using the _.each and _.sortby library calls. I’m wondering if there’s any possible way to get the index of the value within the iterator delegate
_.sortBy([1, 4, 2, 66, 444, 9], function(num){
/*It'd be great to have access to the index in here */
return Math.sin(num);
});
Index is actually available like;