14
var myArray = [{date:"2013.03.01"},{date:"2013.03.08"},{date:"2013.03.19"}];
I tried:
function(a,b){
return b.date > a.date;
}
and
function(a,b){
return b.date - a.date;
}
The console.log in Chrome and Firefox give me the desired output:
"2013.03.19", "2013.03.08", "2013.03.01"
but Safari give the original sorting:
"2013.03.01", "2013.03.08", "2013.03.19"
Why?