I
I
i_want_to_know_everything2017-06-09 12:41:05
JavaScript
i_want_to_know_everything, 2017-06-09 12:41:05

Does sorting an array alphabetically work strangely?

https://jsfiddle.net/250orzjv/
I sort by the sort field. it is equal to the address field, but all in lower case.
I cut off the index (if any) and the city from it for a long time.
Sorted purely by street name.

at the exit I get

410018, Saratov, Ust-Kurdyumskaya, 7A
Saratov, BAKHMETEVSKAYA, 20/24
410033, Saratov, named after 50 years of October, 107a, office 204
410017, Saratov, named after Rakhova V.G., 26/40
410054, Saratov, Begovaya, 19
410012, Saratov, named after A.M. Gorky, 33, office 1
410009, Saratov, named after 50 years of October, 13
410005, Saratov, named after Razin S.T., 58A
410056, Saratov, named after Chapaeva V.I. , 4
410004, Saratov, named after Chernyshevsky N.G., 56
410012, Saratov, Moscow, 110
410044, Saratov, Builders, 6
410064, Saratov, Tarkhova, 1A
410035, Saratov, Tarkhova, 31A
410056, Saratov, Ulyanovsk, 3
410015, Saratov, Entuziastov, 34/40


The first four streets are not as expected.
And in IE sorting doesn't work at all.
Please point out the error

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
furrya_black, 2017-06-09
@furrya_black

The code is not readable

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question