Well I'm with an array of objects and I need to sort the closest to today to far away from today. For example today is 24/11/2015 ai I have in my array the dates:
30/11/2015
27/11/2015
25/11/2015
30/11/2015
In case the result I'm needing is that these dates come like this:
25/11/2015
27/11/2015
30/11/2015
30/11/2015
Within my array I can date, name, and phone.
I tried to use sort()
inside this array but it did not work. I actually do not quite understand why sort()