Mwnci usort() Function

Syntax

usort(array)

Description

The usort() function returns a new array sorted in ascending order, with duplicates removed.

Example

a=[5,4,3,3,3,2,1,7,7,7,7,8,8,8,9]
b=usort(a)
println(a,"\n", b)
a=["Eccles", "Eccles", "Neddie", "Grytpipe", "Grytpipe", "Grytpipe", "Moriarty"]
b=usort(a)
println(a,"\n", b)

[5, 4, 3, 3, 3, 2, 1, 7, 7, 7, 7, 8, 8, 8, 9]
[1, 2, 3, 4, 5, 7, 8, 9]
["Eccles", "Eccles", "Neddie", "Grytpipe", "Grytpipe", "Grytpipe", "Moriarty"]
["Eccles", "Grytpipe", "Moriarty", "Neddie"]