Thông báo: Tất cả dự án phi thương mại đã đăng ký sử dụng Earth Engine trước ngày 15 tháng 4 năm 2025 phải xác minh điều kiện sử dụng phi thương mại để duy trì quyền truy cập vào Earth Engine.
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Sắp xếp danh sách theo thứ tự tăng dần. Nếu bạn cung cấp đối số "keys", thì đối số này sẽ được sắp xếp trước và các phần tử của "list" sẽ được đặt theo cùng một thứ tự.
Cách sử dụng
Giá trị trả về
List.sort(keys)
Danh sách
Đối số
Loại
Thông tin chi tiết
this: list
Danh sách
Danh sách cần sắp xếp.
keys
Danh sách, mặc định: null
Khoá không bắt buộc để sắp xếp. Nếu bạn cung cấp "keys", thì trường này phải có cùng độ dài với "list".
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-07-26 UTC."],[[["`List.sort()` arranges the elements of a list in ascending order, modifying the original list directly."],["An optional `keys` argument can be provided to specify the order in which elements should be sorted, requiring `keys` to be the same length as the list being sorted."]]],["The function `List.sort()` sorts a list in ascending order. It optionally accepts a `keys` argument, a list of the same length, to dictate the sort order. If `keys` is provided, the original `list` is reordered to match the sorted `keys`. The function returns the sorted `list`. If `keys` are not provided it sorts the list itself, by its values, in ascending order.\n"]]