sort() 方法還可用於使用compare 函式對物件陣列進行排序。 ... log(persons); // Sort by name persons.sort(function(a, b) { var x = a.name.
確定! 回上一頁