backupRoswaal has moved to roswaal.app. These pages are a backup copy.Go to roswaal.app

SortLuau✎

Sorts an array in place, smallest first, or by Compare: a function given two values that returns whether the first goes before the second.

Pending review

SortTabledefaultCompare
  • the language itself, so it works in Roblox and in Lune

Inputs

  • in:execution
  • Table:tablemust be wired
  • Compare:functionmust be wired

Outputs

  • then:execution

What it compiles to

luau
table.sort(value, compare)

Not reviewed yet