ARRAY.sort(function(a,b){return a-b});
this code sorts an array from highest to lowest. I have a property that i want it to use to sort the array, since each element has 3 properties, and one of them is "time" which is what i want it to check and sort based on.
But i can't do Array.time.sort
. How would i accomplish this?