我需要根据字母对数组进行排序。我试过 javascript 的 sort() 方法,但它不起作用,因为我的数组由数字、小写字母和大写字母组成。有人可以帮我解决这个问题吗?谢谢
例如,我的数组是:
[
"@Basil",
"@SuperAdmin",
"@Supreme",
"@Test10",
"@Test3",
"@Test4",
"@Test5",
"@Test6",
"@Test7",
"@Test8",
"@Test9",
"@a",
"@aadfg",
"@abc",
"@abc1",
"@abc2",
"@abc5",
"@abcd",
"@abin",
"@akrant",
"@ankur",
"@arsdarsd",
"@asdd",
"@ashaa",
"@aviral",
"@ayush.kansal",
"@chris",
"@dgji",
"@dheeraj",
"@dsfdsf",
"@dualworld",
"@errry",
"@george",
"@ggh",
"@gjhggjghj"
]