The code in Listing 4 shows how you can sort an array of Czech words differently based on the locale used for the collator.
清单4内的代码显示了如何基于为这个collator所用的locale来对由捷克文组成的一个数组进行排序。
The function used to sort the array is the compareFunction that was passed into the function when it was called.
用于对数组进行排序的函数是 compareFunction,该函数是作为参数传递给 sort 函数的。
sortBy is an array of sort objects that determines how the returned array is sorted.
sortBy 是一个 sort 对象数组,用于确定如何对返回的数组排序。
Well here is my array of 8, you know what, it's too much work to sort all 8.
这是有8个杯子的一个序列,要对这8个杯子进行排序就会花费较大功夫。
应用推荐