I want to use a callback function for when the sort method has finished sorting the numbers inside the array. I would think that it must look something like this:
totals.sort(function(a, b){b - a; continuation()});
Somehow though, my code isn't doing what it is supposed to do. Therefore I am wondering wheter or not it is because of this line of code. In case it is, can anyone please tell me the appropriate way to do this.