Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Sortuje listę w kolejności rosnącej. Jeśli podano argument „keys”, lista jest najpierw sortowana, a elementy „list” są umieszczane w tej samej kolejności.
Wykorzystanie
Zwroty
List.sort(keys)
Lista
Argument
Typ
Szczegóły
to: list
Lista
Lista do posortowania.
keys
Lista, domyślna: null
Opcjonalne klucze, według których można sortować. Jeśli podano pole „keys”, musi ono mieć taką samą długość jak pole „list”.
[[["Łatwo zrozumieć","easyToUnderstand","thumb-up"],["Rozwiązało to mój problem","solvedMyProblem","thumb-up"],["Inne","otherUp","thumb-up"]],[["Brak potrzebnych mi informacji","missingTheInformationINeed","thumb-down"],["Zbyt skomplikowane / zbyt wiele czynności do wykonania","tooComplicatedTooManySteps","thumb-down"],["Nieaktualne treści","outOfDate","thumb-down"],["Problem z tłumaczeniem","translationIssue","thumb-down"],["Problem z przykładami/kodem","samplesCodeIssue","thumb-down"],["Inne","otherDown","thumb-down"]],["Ostatnia aktualizacja: 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"]]