I have the same arrays with strings, but they it
array does not sort correctly and it is copied from my pc. items
is typed in the browser.
https://jsfiddle.net/acc8xf0g/
var items = ["hard", "intermediate", "easy"];
var it = [
"intermediate",
"hard",
"еasy"
];
items.sort(function(a, b) {
return a.localeCompare(b);
});
it.sort(function(a, b) {
return a.localeCompare(b);
})
$("#test").html(items.join(" "));
$("#test2").html(it.join(" "));