标签: coffeescript
我有一个数组说myArray = ["Manu","Anju","Zamya","Bijoy"]
myArray = ["Manu","Anju","Zamya","Bijoy"]
如何使用coffeescript按字母顺序对此数组进行排序?
coffeescript
预期输出:myArray = ["Anju","Bijoy","Manu","Zamya"]
myArray = ["Anju","Bijoy","Manu","Zamya"]
答案 0 :(得分:2)
看不到问题,这与js sort功能相同:myArray.sort()
sort
myArray.sort()